text stringlengths 559 401k | source stringlengths 13 121 |
|---|---|
A visitor pattern is a software design pattern that separates the algorithm from the object structure. Because of this separation, new operations can be added to existing object structures without modifying the structures. It is one way to follow the open/closed principle in object-oriented programming and software engineering.
In essence, the visitor allows adding new virtual functions to a family of classes, without modifying the classes. Instead, a visitor class is created that implements all of the appropriate specializations of the virtual function. The visitor takes the instance reference as input, and implements the goal through double dispatch.
Programming languages with sum types and pattern matching obviate many of the benefits of the visitor pattern, as the visitor class is able to both easily branch on the type of the object and generate a compiler error if a new object type is defined which the visitor does not yet handle.
== Overview ==
The Visitor
design pattern is one of the twenty-three well-known Gang of Four design patterns
that 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.
=== Problems, the Visitor design pattern can solve ===
It should be possible to define a new operation for (some) classes of an object structure without changing the classes.
When new operations are needed frequently and the object structure consists of many unrelated classes,
it's inflexible to add new subclasses each time a new operation is required
because "[..] distributing all these operations across the various node classes leads to a system that's hard to understand, maintain, and change."
=== Solution, the Visitor design pattern describes ===
Define a separate (visitor) object that implements an operation to be performed on elements of an object structure.
Clients traverse the object structure and call a dispatching operation accept (visitor) on an element — that "dispatches" (delegates) the request to the "accepted visitor object". The visitor object then performs the operation on the element ("visits the element").
This makes it possible to create new operations independently from the classes of an object structure
by adding new visitor objects.
See also the UML class and sequence diagram below.
== Definition ==
The Gang of Four defines the Visitor as:
Represent[ing] an operation to be performed on elements of an object structure. Visitor lets you define a new operation without changing the classes of the elements on which it operates.
The nature of the Visitor makes it an ideal pattern to plug into public APIs, thus allowing its clients to perform operations on a class using a "visiting" class without having to modify the source.
== Advantages ==
Moving operations into visitor classes is beneficial when
many unrelated operations on an object structure are required,
the classes that make up the object structure are known and not expected to change,
new operations need to be added frequently,
an algorithm involves several classes of the object structure, but it is desired to manage it in one single location,
an algorithm needs to work across several independent class hierarchies.
A drawback to this pattern, however, is that it makes extensions to the class hierarchy more difficult, as new classes typically require a new visit method to be added to each visitor.
== Application ==
Consider the design of a 2D computer-aided design (CAD) system. At its core, there are several types to represent basic geometric shapes like circles, lines, and arcs. The entities are ordered into layers, and at the top of the type hierarchy is the drawing, which is simply a list of layers, plus some added properties.
A fundamental operation on this type hierarchy is saving a drawing to the system's native file format. At first glance, it may seem acceptable to add local save methods to all types in the hierarchy. But it is also useful to be able to save drawings to other file formats. Adding ever more methods for saving into many different file formats soon clutters the relatively pure original geometric data structure.
A naive way to solve this would be to maintain separate functions for each file format. Such a save function would take a drawing as input, traverse it, and encode into that specific file format. As this is done for each added different format, duplication between the functions accumulates. For example, saving a circle shape in a raster format requires very similar code no matter what specific raster form is used, and is different from other primitive shapes. The case for other primitive shapes like lines and polygons is similar. Thus, the code becomes a large outer loop traversing through the objects, with a large decision tree inside the loop querying the type of the object. Another problem with this approach is that it is very easy to miss a shape in one or more savers, or a new primitive shape is introduced, but the save routine is implemented only for one file type and not others, leading to code extension and maintenance problems. As the versions of the same file grows it becomes more complicated to maintain it.
Instead, the visitor pattern can be applied. It encodes the logical operation (i.e. save(image_tree)) on the whole hierarchy into one class (i.e. Saver) that implements the common methods for traversing the tree and describes virtual helper methods (i.e. save_circle, save_square, etc.) to be implemented for format specific behaviors. In the case of the CAD example, such format specific behaviors would be implemented by a subclass of Visitor (i.e. SaverPNG). As such, all duplication of type checks and traversal steps is removed. Additionally, the compiler now complains if a shape is omitted since it is now expected by the common base traversal/save function.
=== Iteration loops ===
The visitor pattern may be used for iteration over container-like data structures just like Iterator pattern but with limited functionality.: 288 For example, iteration over a directory structure could be implemented by a function class instead of more conventional loop pattern. This would allow deriving various useful information from directories content by implementing a visitor functionality for every item while reusing the iteration code. It's widely employed in Smalltalk systems and can be found in C++ as well.: 289 A drawback of this approach, however, is that you can't break out of the loop easily or iterate concurrently (in parallel i.e. traversing two containers at the same time by a single i variable).: 289 The latter would require writing additional functionality for a visitor to support these features.: 289
== Structure ==
=== UML class and sequence diagram ===
In the UML class diagram above, the ElementA class doesn't implement a new operation directly.
Instead, ElementA implements a dispatching operation accept(visitor) that "dispatches" (delegates) a request to the "accepted visitor object" (visitor.visitElementA(this)). The Visitor1 class implements the operation (visitElementA(e:ElementA)).
ElementB then implements accept(visitor) by dispatching to visitor.visitElementB(this). The Visitor1 class implements the operation (visitElementB(e:ElementB)).
The UML sequence diagram
shows the run-time interactions: The Client object traverses the elements of an object structure (ElementA,ElementB) and calls accept(visitor) on each element.
First, the Client calls accept(visitor) on
ElementA, which calls visitElementA(this) on the accepted visitor object.
The element itself (this) is passed to the visitor so that
it can "visit" ElementA (call operationA()).
Thereafter, the Client calls accept(visitor) on
ElementB, which calls visitElementB(this) on the visitor that "visits" ElementB (calls operationB()).
=== Class diagram ===
== Details ==
The visitor pattern requires a programming language that supports single dispatch, as common object-oriented languages (such as C++, Java, Smalltalk, Objective-C, Swift, JavaScript, Python and C#) do. Under this condition, consider two objects, each of some class type; one is termed the element, and the other is visitor.
=== Objects ===
==== Visitor ====
The visitor declares a visit method, which takes the element as an argument, for each class of element. Concrete visitors are derived from the visitor class and implement these visit methods, each of which implements part of the algorithm operating on the object structure. The state of the algorithm is maintained locally by the concrete visitor class.
==== Element ====
The element declares an accept method to accept a visitor, taking the visitor as an argument. Concrete elements, derived from the element class, implement the accept method. In its simplest form, this is no more than a call to the visitor's visit method. Composite elements, which maintain a list of child objects, typically iterate over these, calling each child's accept method.
==== Client ====
The client creates the object structure, directly or indirectly, and instantiates the concrete visitors. When an operation is to be performed which is implemented using the Visitor pattern, it calls the accept method of the top-level element(s).
=== Methods ===
==== Accept ====
When the accept method is called in the program, its implementation is chosen based on both the dynamic type of the element and the static type of the visitor. When the associated visit method is called, its implementation is chosen based on both the dynamic type of the visitor and the static type of the element, as known from within the implementation of the accept method, which is the same as the dynamic type of the element. (As a bonus, if the visitor can't handle an argument of the given element's type, then the compiler will catch the error.)
==== Visit ====
Thus, the implementation of the visit method is chosen based on both the dynamic type of the element and the dynamic type of the visitor. This effectively implements double dispatch. For languages whose object systems support multiple dispatch, not only single dispatch, such as Common Lisp or C# via the Dynamic Language Runtime (DLR), implementation of the visitor pattern is greatly simplified (a.k.a. Dynamic Visitor) by allowing use of simple function overloading to cover all the cases being visited. A dynamic visitor, provided it operates on public data only, conforms to the open/closed principle (since it does not modify extant structures) and to the single responsibility principle (since it implements the Visitor pattern in a separate component).
In this way, one algorithm can be written to traverse a graph of elements, and many different kinds of operations can be performed during that traversal by supplying different kinds of visitors to interact with the elements based on the dynamic types of both the elements and the visitors.
== Examples ==
=== C# ===
This example declares a separate ExpressionPrintingVisitor class that takes care of the printing. If the introduction of a new concrete visitor is desired, a new class will be created to implement the Visitor interface, and new implementations for the Visit methods will be provided. The existing classes (Literal and Addition) will remain unchanged.
=== Smalltalk ===
In this case, it is the object's responsibility to know how to print itself on a stream. The visitor here is then the object, not the stream.
=== Go ===
Go does not support method overloading, so the visit methods need different names. A typical visitor interface might be
=== Java ===
The following example is in the language Java, and shows how the contents of a tree of nodes (in this case describing the components of a car) can be printed. Instead of creating print methods for each node subclass (Wheel, Engine, Body, and Car), one visitor class (CarElementPrintVisitor) performs the required printing action. Because different node subclasses require slightly different actions to print properly, CarElementPrintVisitor dispatches actions based on the class of the argument passed to its visit method. CarElementDoVisitor, which is analogous to a save operation for a different file format, does likewise.
==== Diagram ====
==== Sources ====
==== Output ====
Visiting front left wheel
Visiting front right wheel
Visiting back left wheel
Visiting back right wheel
Visiting body
Visiting engine
Visiting car
Kicking my front left wheel
Kicking my front right wheel
Kicking my back left wheel
Kicking my back right wheel
Moving my body
Starting my engine
Starting my car
=== Common Lisp ===
==== Sources ====
==== Output ====
"front-left-wheel"
"front-right-wheel"
"rear-left-wheel"
"rear-right-wheel"
"body"
"engine"
kicking wheel "front-left-wheel" 42 times
kicking wheel "front-right-wheel" 42 times
kicking wheel "rear-left-wheel" 42 times
kicking wheel "rear-right-wheel" 42 times
don't know how "body" and 42 should interact
starting engine "engine" 42 times
kicking wheel "front-left-wheel" symbolically using symbol ABC
kicking wheel "front-right-wheel" symbolically using symbol ABC
kicking wheel "rear-left-wheel" symbolically using symbol ABC
kicking wheel "rear-right-wheel" symbolically using symbol ABC
don't know how "body" and ABC should interact
starting engine "engine" symbolically using symbol ABC
==== Notes ====
The other-object parameter is superfluous in traverse. The reason is that it is possible to use an anonymous function that calls the desired target method with a lexically captured object:
Now, the multiple dispatch occurs in the call issued from the body of the anonymous function, and so traverse is just a mapping function that distributes a function application over the elements of an object. Thus all traces of the Visitor Pattern disappear, except for the mapping function, in which there is no evidence of two objects being involved. All knowledge of there being two objects and a dispatch on their types is in the lambda function.
=== Python ===
Python does not support method overloading in the classical sense (polymorphic behavior according to type of passed parameters), so the "visit" methods for the different model types need to have different names.
==== Sources ====
==== Output ====
==== Abstraction ====
Using Python 3 or above allows to make a general implementation of the accept method:
One could extend this to iterate over the class's method resolution order if they would like to fall back on already-implemented classes. They could also use the subclass hook feature to define the lookup in advance.
== Related design patterns ==
Iterator pattern – defines a traversal principle like the visitor pattern, without making a type differentiation within the traversed objects
Church encoding – a related concept from functional programming, in which tagged union/sum types may be modeled using the behaviors of "visitors" on such types, and which enables the visitor pattern to emulate variants and patterns.
== See also ==
Algebraic data type
Double dispatch
Multiple dispatch
Function object
== References ==
== External links ==
The Visitor Family of Design Patterns at the Wayback Machine (archived October 22, 2015). Additional archives: April 12, 2004, March 5, 2002. A rough chapter from The Principles, Patterns, and Practices of Agile Software Development, Robert C. Martin, Prentice Hall
Visitor pattern in UML and in LePUS3 (a Design Description Language)
Article "Componentization: the Visitor Example by Bertrand Meyer and Karine Arnout, Computer (IEEE), vol. 39, no. 7, July 2006, pages 23-30.
Article A Type-theoretic Reconstruction of the Visitor Pattern
Article "The Essence of the Visitor Pattern" by Jens Palsberg and C. Barry Jay. 1997 IEEE-CS COMPSAC paper showing that accept() methods are unnecessary when reflection is available; introduces term 'Walkabout' for the technique.
Article "A Time for Reflection" by Bruce Wallace – subtitled "Java 1.2's reflection capabilities eliminate burdensome accept() methods from your Visitor pattern"
Visitor Pattern using reflection(java).
PerfectJPattern Open Source Project, Provides a context-free and type-safe implementation of the Visitor Pattern in Java based on Delegates.
Visitor Design Pattern | Wikipedia/Visitor_(design_pattern) |
In computer programming, a pure function is a function that has the following properties:
the function return values are identical for identical arguments (no variation with local static variables, non-local variables, mutable reference arguments or input streams, i.e., referential transparency), and
the function has no side effects (no mutation of non-local variables, mutable reference arguments or input/output streams).
== Examples ==
=== Pure functions ===
The following examples of C++ functions are pure:
=== Impure functions ===
The following C++ functions are impure as they lack the above property 1:
The following C++ functions are impure as they lack the above property 2:
The following C++ functions are impure as they lack both the above properties 1 and 2:
== I/O in pure functions ==
I/O is inherently impure: input operations undermine referential transparency, and output operations create side effects. Nevertheless, there is a sense in which a function can perform input or output and still be pure, if the sequence of operations on the relevant I/O devices is modeled explicitly as both an argument and a result, and I/O operations are taken to fail when the input sequence does not describe the operations actually taken since the program began execution.
The second point ensures that the only sequence usable as an argument must change with each I/O action; the first allows different calls to an I/O-performing function to return different results on account of the sequence arguments having changed.
The I/O monad is a programming idiom typically used to perform I/O in pure functional languages.
== Memoization ==
The outputs of a pure function can be cached in a look-up table. Any result that is returned from a given function is cached, and the next time the function is called with the same input parameters, the cached result is returned instead of computing the function again.
Memoization can be performed by wrapping the function in another function (wrapper function).
By means of memoization, the computational effort involved in the computations of the function itself can be reduced, at the cost of the overhead for managing the cache and an increase of memory requirements.
A C program for cached computation of factorial (assert() aborts with an error message if its argument is false; on a 32-bit machine, values beyond fact(12) cannot be represented.)
== Compiler optimizations ==
Functions that have just the above property 2 – that is, have no side effects – allow for compiler optimization techniques such as common subexpression elimination and loop optimization similar to arithmetic operators. A C++ example is the length method, returning the size of a string, which depends on the memory contents where the string points to, therefore lacking the above property 1. Nevertheless, in a single-threaded environment, the following C++ code
can be optimized such that the value of s.length() is computed only once, before the loop.
Some programming languages allow for declaring a pure property to a function:
In Fortran and D, the pure keyword can be used to declare a function to be just side-effect free (i.e. have just the above property 2). The compiler may be able to deduce property 1 on top of the declaration. See also: Fortran 95 language features § Pure procedures.
In the GCC, the pure attribute specifies property 2, while the const attribute specifies a truly pure function with both properties.
Languages offering compile-time function execution may require functions to be pure, sometimes with the addition of some other constraints. Examples include constexpr of C++ (both properties). See also: C++11 § constexpr – Generalized constant expressions.
== Unit testing ==
Since pure functions have identical return values for identical arguments, they are well suited to unit testing.
== See also ==
Compile-time function execution – The evaluation of pure functions at compile time
Deterministic algorithm – Algorithm that, given a particular input, will always produce the same output
Idempotence – Property of operations whereby they can be applied multiple times without changing the result
Lambda calculus – Mathematical-logic system based on functions
Purely functional data structure – Data structure implementable in purely functional languages
Reentrancy (computing) – Executing a function concurrently without interfering with other invocations
== References == | Wikipedia/Pure_function |
Computer-aided design (CAD) is the use of computers (or workstations) to aid in the creation, modification, analysis, or optimization of a design.: 3 This software is used to increase the productivity of the designer, improve the quality of design, improve communications through documentation, and to create a database for manufacturing.: 4 Designs made through CAD software help protect products and inventions when used in patent applications. CAD output is often in the form of electronic files for print, machining, or other manufacturing operations. The terms computer-aided drafting (CAD) and computer-aided design and drafting (CADD) are also used.
Its use in designing electronic systems is known as electronic design automation (EDA). In mechanical design it is known as mechanical design automation (MDA), which includes the process of creating a technical drawing with the use of computer software.
CAD software for mechanical design uses either vector-based graphics to depict the objects of traditional drafting, or may also produce raster graphics showing the overall appearance of designed objects. However, it involves more than just shapes. As in the manual drafting of technical and engineering drawings, the output of CAD must convey information, such as materials, processes, dimensions, and tolerances, according to application-specific conventions.
CAD may be used to design curves and figures in two-dimensional (2D) space; or curves, surfaces, and solids in three-dimensional (3D) space.: 71, 106
CAD is an important industrial art extensively used in many applications, including automotive, shipbuilding, and aerospace industries, industrial and architectural design (building information modeling), prosthetics, and many more. CAD is also widely used to produce computer animation for special effects in movies, advertising and technical manuals, often called DCC digital content creation. The modern ubiquity and power of computers means that even perfume bottles and shampoo dispensers are designed using techniques unheard of by engineers of the 1960s. Because of its enormous economic importance, CAD has been a major driving force for research in computational geometry, computer graphics (both hardware and software), and discrete differential geometry.
The design of geometric models for object shapes, in particular, is occasionally called computer-aided geometric design (CAGD).
== Overview ==
Computer-aided design is one of the many tools used by engineers and designers and is used in many ways depending on the profession of the user and the type of software in question.
CAD is one part of the whole digital product development (DPD) activity within the product lifecycle management (PLM) processes, and as such is used together with other tools, which are either integrated modules or stand-alone products, such as:
Computer-aided engineering (CAE) and finite element analysis (FEA, FEM)
Computer-aided manufacturing (CAM) including instructions to computer numerical control (CNC) machines
Photorealistic rendering and motion simulation
Document management and revision control using product data management (PDM)
CAD is also used for the accurate creation of photo simulations that are often required in the preparation of environmental impact reports, in which computer-aided designs of intended buildings are superimposed into photographs of existing environments to represent what that locale will be like, where the proposed facilities are allowed to be built. Potential blockage of view corridors and shadow studies are also frequently analyzed through the use of CAD.
== Types ==
There are several different types of CAD, each requiring the operator to think differently about how to use them and design their virtual components in a different manner. Virtually all of CAD tools rely on constraint concepts that are used to define geometric or non-geometric elements of a model.
=== 2D CAD ===
There are many producers of the lower-end 2D sketching systems, including a number of free and open-source programs. These provide an approach to the drawing process where scale and placement on the drawing sheet can easily be adjusted in the final draft as required, unlike in hand drafting.
=== 3D CAD ===
3D wireframe is an extension of 2D drafting into a three-dimensional space. Each line has to be manually inserted into the drawing. The final product has no mass properties associated with it and cannot have features directly added to it, such as holes. The operator approaches these in a similar fashion to the 2D systems, although many 3D systems allow using the wireframe model to make the final engineering drawing views.
3D "dumb" solids are created in a way analogous to manipulations of real-world objects. Basic three-dimensional geometric forms (e.g., prisms, cylinders, spheres, or rectangles) have solid volumes added or subtracted from them as if assembling or cutting real-world objects. Two-dimensional projected views can easily be generated from the models. Basic 3D solids do not usually include tools to easily allow the motion of the components, set their limits to their motion, or identify interference between components.
There are several types of 3D solid modeling
Parametric modeling allows the operator to use what is referred to as "design intent". The objects and features are created modifiable. Any future modifications can be made by changing on how the original part was created. If a feature was intended to be located from the center of the part, the operator should locate it from the center of the model. The feature could be located using any geometric object already available in the part, but this random placement would defeat the design intent. If the operator designs the part as it functions, the parametric modeler is able to make changes to the part while maintaining geometric and functional relationships.
Direct or explicit modeling provide the ability to edit geometry without a history tree. With direct modeling, once a sketch is used to create geometry it is incorporated into the new geometry, and the designer only has to modify the geometry afterward without needing the original sketch. As with parametric modeling, direct modeling has the ability to include the relationships between selected geometry (e.g., tangency, concentricity).
Assembly modelling is a process which incorporates results of the previous single-part modelling into a final product containing several parts. Assemblies can be hierarchical, depending on the specific CAD software vendor, and highly complex models can be achieved (e.g. in building engineering by using computer-aided architectural design software): 539
==== Freeform CAD ====
Top-end CAD systems offer the capability to incorporate more organic, aesthetic and ergonomic features into the designs. Freeform surface modeling is often combined with solids to allow the designer to create products that fit the human form and visual requirements as well as they interface with the machine.
== Technology ==
Originally software for CAD systems was developed with computer languages such as Fortran, ALGOL but with the advancement of object-oriented programming methods this has radically changed. Typical modern parametric feature-based modeler and freeform surface systems are built around a number of key C modules with their own APIs. A CAD system can be seen as built up from the interaction of a graphical user interface (GUI) with NURBS geometry or boundary representation (B-rep) data via a geometric modeling kernel. A geometry constraint engine may also be employed to manage the associative relationships between geometry, such as wireframe geometry in a sketch or components in an assembly.
Unexpected capabilities of these associative relationships have led to a new form of prototyping called digital prototyping. In contrast to physical prototypes, which entail manufacturing time in the design. That said, CAD models can be generated by a computer after the physical prototype has been scanned using an industrial CT scanning machine. Depending on the nature of the business, digital or physical prototypes can be initially chosen according to specific needs.
Today, CAD systems exist for all the major platforms (Windows, Linux, UNIX and Mac OS X); some packages support multiple platforms.
Currently, no special hardware is required for most CAD software. However, some CAD systems can do graphically and computationally intensive tasks, so a modern graphics card, high speed (and possibly multiple) CPUs and large amounts of RAM may be recommended.
The human-machine interface is generally via a computer mouse but can also be via a pen and digitizing graphics tablet. Manipulation of the view of the model on the screen is also sometimes done with the use of a Spacemouse/SpaceBall. Some systems also support stereoscopic glasses for viewing the 3D model. Technologies that in the past were limited to larger installations or specialist applications have become available to a wide group of users. These include the CAVE or HMDs and interactive devices like motion-sensing technology
== Software ==
Starting with the IBM Drafting System in the mid-1960s, computer-aided design systems began to provide more capabilitties than just an ability to reproduce manual drafting with electronic drafting, and the cost-benefit for companies to switch to CAD became apparent. The software automated many tasks that are taken for granted from computer systems today, such as automated generation of bills of materials, auto layout in integrated circuits, interference checking, and many others. Eventually, CAD provided the designer with the ability to perform engineering calculations. During this transition, calculations were still performed either by hand or by those individuals who could run computer programs. CAD was a revolutionary change in the engineering industry, where draftsman, designer, and engineer roles that had previously been separate began to merge. CAD is an example of the pervasive effect computers were beginning to have on the industry.
Current computer-aided design software packages range from 2D vector-based drafting systems to 3D solid and surface modelers. Modern CAD packages can also frequently allow rotations in three dimensions, allowing viewing of a designed object from any desired angle, even from the inside looking out. Some CAD software is capable of dynamic mathematical modeling.
CAD technology is used in the design of tools and machinery and in the drafting and design of all types of buildings, from small residential types (houses) to the largest commercial and industrial structures (hospitals and factories).
CAD is mainly used for detailed design of 3D models or 2D drawings of physical components, but it is also used throughout the engineering process from conceptual design and layout of products, through strength and dynamic analysis of assemblies to definition of manufacturing methods of components. It can also be used to design objects such as jewelry, furniture, appliances, etc. Furthermore, many CAD applications now offer advanced rendering and animation capabilities so engineers can better visualize their product designs. 4D BIM is a type of virtual construction engineering simulation incorporating time or schedule-related information for project management.
CAD has become an especially important technology within the scope of computer-aided technologies, with benefits such as lower product development costs and a greatly shortened design cycle. CAD enables designers to layout and develop work on screen, print it out and save it for future editing, saving time on their drawings.
=== License management software ===
In the 2000s, some CAD system software vendors shipped their distributions with a dedicated license manager software that controlled how often or how many users can utilize the CAD system.: 166 It could run either on a local machine (by loading from a local storage device) or a local network fileserver and was usually tied to a specific IP address in latter case.: 166
== List of software packages ==
CAD software enables engineers and architects to design, inspect and manage engineering projects within an integrated graphical user interface (GUI) on a personal computer system. Most applications support solid modeling with boundary representation (B-Rep) and NURBS geometry, and enable the same to be published in a variety of formats.
Based on market statistics, commercial software from Autodesk, Dassault Systems, Siemens PLM Software, and PTC dominate the CAD industry. The following is a list of major CAD applications, grouped by usage statistics.
=== Commercial software ===
ABViewer
AC3D
Alibre Design
ArchiCAD (Graphisoft)
AutoCAD (Autodesk)
AutoTURN
AxSTREAM
BricsCAD
CATIA (Dassault Systèmes)
Cobalt
CorelCAD
EAGLE
Fusion 360 (Autodesk)
IntelliCAD
Inventor (Autodesk)
IRONCAD
KeyCreator (Kubotek)
Landscape Express
MEDUSA4
MicroStation (Bentley Systems)
Modelur (AgiliCity)
Onshape (PTC)
NX (Siemens Digital Industries Software)
PTC Creo (successor to Pro/ENGINEER) (PTC)
PunchCAD
Remo 3D
Revit (Autodesk)
Rhinoceros 3D
SketchUp
Solid Edge (Siemens Digital Industries Software)
SOLIDWORKS (Dassault Systèmes)
SpaceClaim
T-FLEX CAD
TranslateCAD
TurboCAD
Vectorworks (Nemetschek)
=== Open-source software ===
Blender
BRL-CAD
FreeCAD
LibreCAD
LeoCAD
OpenSCAD
QCAD
Salome (software)
SolveSpace
=== Freeware ===
BricsCAD Shape
Tinkercad (successor to Autodesk 123D)
=== CAD kernels ===
ACIS by (Spatial Corp owned by Dassault Systèmes)
C3D Toolkit by C3D Labs
Open CASCADE Open Source
Parasolid by (Siemens Digital Industries Software)
ShapeManager by (Autodesk)
== See also ==
== References ==
== External links ==
MIT 1982 CAD lab
Learning materials related to Computer-aided design at Wikiversity
Learning materials related to Computer-aided Geometric Design at Wikiversity | Wikipedia/Computer_Aided_Design |
In functional programming, filter is a higher-order function that processes a data structure (usually a list) in some order to produce a new data structure containing exactly those elements of the original data structure for which a given predicate returns the Boolean value true.
== Example ==
In Haskell, the code example
evaluates to the list 2, 4, …, 10 by applying the predicate even to every element of the list of integers 1, 2, …, 10 in that order and creating a new list of those elements for which the predicate returns the Boolean value true, thereby giving a list containing only the even members of that list. Conversely, the code example
evaluates to the list 1, 3, …, 9 by collecting those elements of the list of integers 1, 2, …, 10 for which the predicate even returns the Boolean value false (with . being the function composition operator).
=== Visual example ===
Below, you can see a view of each step of the filter process for a list of integers X = [0, 5, 8, 3, 2, 1] according to the function :
f
(
x
)
=
{
T
r
u
e
if
x
≡
0
(
mod
2
)
F
a
l
s
e
if
x
≡
1
(
mod
2
)
.
{\displaystyle f(x)={\begin{cases}\mathrm {True} &{\text{ if }}x\equiv 0{\pmod {2}}\\\mathrm {False} &{\text{ if }}x\equiv 1{\pmod {2}}.\end{cases}}}
This function express that if
x
{\displaystyle x}
is even the return value is
T
r
u
e
{\displaystyle \mathrm {True} }
, otherwise it's
F
a
l
s
e
{\displaystyle \mathrm {False} }
. This is the predicate.
== Language comparison ==
Filter is a standard function for many programming languages, e.g.,
Haskell,
OCaml,
Standard ML,
or Erlang.
Common Lisp provides the functions remove-if and remove-if-not.
Scheme Requests for Implementation (SRFI) 1 provides an implementation of filter for the language Scheme.
C++ provides the algorithms remove_if (mutating) and remove_copy_if (non-mutating); C++11 additionally provides copy_if (non-mutating). Smalltalk provides the select: method for collections. Filter can also be realized using list comprehensions in languages that support them.
In Haskell, filter can be implemented like this:
Here, [] denotes the empty list, ++ the list concatenation operation, and [x | p x] denotes a list conditionally holding a value, x, if the condition p x holds (evaluates to True).
== Variants ==
Filter creates its result without modifying the original list. Many programming languages also provide variants that destructively modify the list argument instead for faster performance. Other variants of filter (e.g., Haskell dropWhile and partition) are also common. A common memory optimization for purely functional programming languages is to have the input list and filtered result share the longest common tail (tail-sharing).
== See also ==
Map (higher-order function)
List comprehension
Guard (computing)
== References == | Wikipedia/Filter_(higher-order_function) |
A Hindley–Milner (HM) type system is a classical type system for the lambda calculus with parametric polymorphism. It is also known as Damas–Milner or Damas–Hindley–Milner. It was first described by J. Roger Hindley and later rediscovered by Robin Milner. Luis Damas contributed a close formal analysis and proof of the method in his PhD thesis.
Among HM's more notable properties are its completeness and its ability to infer the most general type of a given program without programmer-supplied type annotations or other hints. Algorithm W is an efficient type inference method in practice and has been successfully applied on large code bases, although it has a high theoretical complexity. HM is preferably used for functional languages. It was first implemented as part of the type system of the programming language ML. Since then, HM has been extended in various ways, most notably with type class constraints like those in Haskell.
== Introduction ==
As a type inference method, Hindley–Milner is able to deduce the types of variables, expressions and functions from programs written in an entirely untyped style. Being scope sensitive, it is not limited to deriving the types only from a small portion of source code, but rather from complete programs or modules. Being able to cope with parametric types, too, it is core to the type systems of many functional programming languages. It was first applied in this manner in the ML programming language.
The origin is the type inference algorithm for the simply typed lambda calculus that was devised by Haskell Curry and Robert Feys in 1958.
In 1969, J. Roger Hindley extended this work and proved that their algorithm always inferred the most general type.
In 1978, Robin Milner, independently of Hindley's work, provided an equivalent algorithm, Algorithm W.
In 1982, Luis Damas finally proved that Milner's algorithm is complete and extended it to support systems with polymorphic references.
=== Monomorphism vs. polymorphism ===
In the simply typed lambda calculus, types T are either atomic type constants or function types of form
T
→
T
{\displaystyle T\rightarrow T}
. Such types are monomorphic. Typical examples are the types used in arithmetic values:
3 : Number
add 3 4 : Number
add : Number -> Number -> Number
Contrary to this, the untyped lambda calculus is neutral to typing at all, and many of its functions can be meaningfully applied to all type of arguments. The trivial example is the identity function
id ≡ λ x . x
which simply returns whatever value it is applied to. Less trivial examples include parametric types like lists.
While polymorphism in general means that operations accept values of more than one type, the polymorphism used here is parametric. One finds the notation of type schemes in the literature, too, emphasizing the parametric nature of the polymorphism. Additionally, constants may be typed with (quantified) type variables. E.g.:
cons : forall a . a -> List a -> List a
nil : forall a . List a
id : forall a . a -> a
Polymorphic types can become monomorphic by consistent substitution of their variables. Examples of monomorphic instances are:
id' : String -> String
nil' : List Number
More generally, types are polymorphic when they contain type variables, while types without them are monomorphic.
Contrary to the type systems used for example in Pascal (1970) or C (1972), which only support monomorphic types, HM is designed with emphasis on parametric polymorphism. The successors of the languages mentioned, like C++ (1985), focused on different types of polymorphism, namely subtyping in connection with object-oriented programming and overloading. While subtyping is incompatible with HM, a variant of systematic overloading is available in the HM-based type system of Haskell.
=== Let-polymorphism ===
When extending the type inference for the simply-typed lambda calculus towards polymorphism, one has to decide whether assigning a polymorphic type not only as type of an expression, but also as the type of a λ-bound variable is admissible. This would allow the generic identity type to be assigned to the variable 'id' in:
(λ id . ... (id 3) ... (id "text") ... ) (λ x . x)
Allowing this gives rise to the polymorphic lambda calculus; however, unfortunately, type inference in this system is not decidable. Instead, HM distinguishes variables that are immediately bound to an expression from more general λ-bound variables, calling the former let-bound variables, and allows polymorphic types to be assigned only to these. This leads to let-polymorphism where the above example takes the form
let id = λ x . x
in ... (id 3) ... (id "text") ...
which can be typed with a polymorphic type for 'id'. As indicated, the expression syntax is extended to make the let-bound variables explicit, and by restricting the type system to allow only let-bound variable to have polymorphic types, while the parameters in lambda-abstractions must get a monomorphic type, type inference becomes decidable.
== Overview ==
The remainder of this article proceeds as follows:
The HM type system is defined. This is done by describing a deduction system that makes precise what expressions have what type, if any.
From there, it works towards an implementation of the type inference method. After introducing a syntax-driven variant of the above deductive system, it sketches an efficient implementation (algorithm J), appealing mostly to the reader's metalogical intuition.
Because it remains open whether algorithm J indeed realises the initial deduction system, a less efficient implementation (algorithm W), is introduced and its use in a proof is hinted.
Finally, further topics related to the algorithm are discussed.
The same description of the deduction system is used throughout, even for the two algorithms, to make the various forms in which the HM method is presented directly comparable.
== The Hindley–Milner type system ==
The type system can be formally described by syntax rules that fix a language for the expressions, types, etc. The presentation here of such a syntax is not too formal, in that it is written down not to study the surface grammar, but rather the depth grammar, and leaves some syntactical details open. This form of presentation is usual. Building on this, typing rules are used to define how expressions and types are related. As before, the form used is a bit liberal.
=== Syntax ===
The expressions to be typed are exactly those of the lambda calculus extended with a let-expression as shown in the adjacent table. Parentheses can be used to disambiguate an expression. The application is left-binding and binds stronger than abstraction or the let-in construct.
Types are syntactically split into two groups, monotypes and polytypes.
==== Monotypes ====
Monotypes always designate a particular type. Monotypes
τ
{\displaystyle \tau }
are syntactically represented as terms.
Examples of monotypes include type constants like
i
n
t
{\displaystyle {\mathtt {int}}}
or
s
t
r
i
n
g
{\displaystyle {\mathtt {string}}}
, and parametric types like
M
a
p
(
S
e
t
s
t
r
i
n
g
)
i
n
t
{\displaystyle {\mathtt {Map\ (Set\ string)\ int}}}
. The latter types are examples of applications of type functions, for example, from the set
{
M
a
p
2
,
S
e
t
1
,
s
t
r
i
n
g
0
,
i
n
t
0
,
→
2
}
{\displaystyle \{{\mathtt {Map^{2},\ Set^{1},\ string^{0},\ int^{0}}},\ \rightarrow ^{2}\}}
,
where the superscript indicates the number of type parameters. The complete set of type functions
C
{\displaystyle C}
is arbitrary in HM, except that it must contain at least
→
2
{\displaystyle \rightarrow ^{2}}
, the type of functions. It is often written in infix notation for convenience. For example, a function mapping integers to strings has type
i
n
t
→
s
t
r
i
n
g
{\displaystyle {\mathtt {int}}\rightarrow {\mathtt {string}}}
. Again, parentheses can be used to disambiguate a type expression. The application binds stronger than the infix arrow, which is right-binding.
Type variables are admitted as monotypes. Monotypes are not to be confused with monomorphic types, which exclude variables and allow only ground terms.
Two monotypes are equal if they have identical terms.
==== Polytypes ====
Polytypes (or type schemes) are types containing variables bound by zero or more for-all quantifiers, e.g.
∀
α
.
α
→
α
{\displaystyle \forall \alpha .\alpha \rightarrow \alpha }
.
A function with polytype
∀
α
.
α
→
α
{\displaystyle \forall \alpha .\alpha \rightarrow \alpha }
can map any value of the same type to itself,
and the identity function is a value for this type.
As another example,
∀
α
.
(
S
e
t
α
)
→
i
n
t
{\displaystyle \forall \alpha .({\mathtt {Set}}\ \alpha )\rightarrow {\mathtt {int}}}
is the type of a function mapping all finite sets to integers. A function which returns the cardinality of a set would be a value of this type.
Quantifiers can only appear top level. For instance, a type
∀
α
.
α
→
∀
α
.
α
{\displaystyle \forall \alpha .\alpha \rightarrow \forall \alpha .\alpha }
is excluded by the syntax of types. Also monotypes are included in the polytypes, thus a type has the general form
∀
α
1
…
∀
α
n
.
τ
{\displaystyle \forall \alpha _{1}\dots \forall \alpha _{n}.\tau }
, where
n
≥
0
{\displaystyle n\geq 0}
and
τ
{\displaystyle \tau }
is a monotype.
Equality of polytypes is up to reordering the quantification and renaming the quantified variables (
α
{\displaystyle \alpha }
-conversion). Further, quantified variables not occurring in the monotype can be dropped.
==== Context and typing ====
To meaningfully bring together the still disjoint parts (syntax expressions and types) a third part is needed: context. Syntactically, a context is a list of pairs
x
:
σ
{\displaystyle x:\sigma }
, called assignments, assumptions or bindings, each pair stating that value variable
x
i
{\displaystyle x_{i}}
has type
σ
i
.
{\displaystyle \sigma _{i}.}
All three parts combined give a typing judgment of the form
Γ
⊢
e
:
σ
{\displaystyle \Gamma \ \vdash \ e:\sigma }
, stating that under assumptions
Γ
{\displaystyle \Gamma }
, the expression
e
{\displaystyle e}
has type
σ
{\displaystyle \sigma }
.
==== Free type variables ====
In a type
∀
α
1
…
∀
α
n
.
τ
{\displaystyle \forall \alpha _{1}\dots \forall \alpha _{n}.\tau }
, the symbol
∀
{\displaystyle \forall }
is the quantifier binding the type variables
α
i
{\displaystyle \alpha _{i}}
in the monotype
τ
{\displaystyle \tau }
. The variables
α
i
{\displaystyle \alpha _{i}}
are called quantified and any occurrence of a quantified type variable in
τ
{\displaystyle \tau }
is called bound and all unbound type variables in
τ
{\displaystyle \tau }
are called free. Additionally to the quantification
∀
{\displaystyle \forall }
in polytypes, type variables can also be bound by occurring in the context, but with the inverse effect on the right hand side of the
⊢
{\displaystyle \vdash }
. Such variables then behave like type constants there. Finally, a type variable may legally occur unbound in a typing, in which case they are implicitly all-quantified.
The presence of both bound and unbound type variables is a bit uncommon in programming languages. Often, all type variables are implicitly treated all-quantified. For instance, one does not have clauses with free variables in Prolog. Likewise in Haskell, where all type variables implicitly occur quantified, i.e. a Haskell type a -> a means
∀
α
.
α
→
α
{\displaystyle \forall \alpha .\alpha \rightarrow \alpha }
here. Related and also very uncommon is the binding effect of the right hand side
σ
{\displaystyle \sigma }
of the assignments.
Typically, the mixture of both bound and unbound type variables originate from the use of free variables in an expression. The constant function K =
λ
x
.
λ
y
.
x
{\displaystyle \lambda x.\lambda y.x}
provides an example. It has the monotype
α
→
β
→
α
{\displaystyle \alpha \rightarrow \beta \rightarrow \alpha }
. One can force polymorphism by
l
e
t
k
=
λ
x
.
(
l
e
t
f
=
λ
y
.
x
i
n
f
)
i
n
k
{\displaystyle \mathbf {let} \ k=\lambda x.(\mathbf {let} \ f=\lambda y.x\ \mathbf {in} \ f)\ \mathbf {in} \ k}
. Herein,
f
{\displaystyle f}
has the type
∀
γ
.
γ
→
α
{\displaystyle \forall \gamma .\gamma \rightarrow \alpha }
. The free monotype variable
α
{\displaystyle \alpha }
originates from the type of the variable
x
{\displaystyle x}
bound in the surrounding scope.
k
{\displaystyle k}
has the type
∀
α
∀
β
.
α
→
β
→
α
{\displaystyle \forall \alpha \forall \beta .\alpha \rightarrow \beta \rightarrow \alpha }
. One could imagine the free type variable
α
{\displaystyle \alpha }
in the type of
f
{\displaystyle f}
be bound by the
∀
α
{\displaystyle \forall \alpha }
in the type of
k
{\displaystyle k}
. But such a scoping cannot be expressed in HM. Rather, the binding is realized by the context.
=== Type order ===
Polymorphism means that one and the same expression can have (perhaps infinitely) many types. But in this type system, these types are not completely unrelated, but rather orchestrated by the parametric polymorphism.
As an example, the identity
λ
x
.
x
{\displaystyle \lambda x.x}
can have
∀
α
.
α
→
α
{\displaystyle \forall \alpha .\alpha \rightarrow \alpha }
as its type as well as
string
→
string
{\displaystyle {\texttt {string}}\rightarrow {\texttt {string}}}
or
int
→
int
{\displaystyle {\texttt {int}}\rightarrow {\texttt {int}}}
and many others, but not
int
→
string
{\displaystyle {\texttt {int}}\rightarrow {\texttt {string}}}
. The most general type for this function is
∀
α
.
α
→
α
{\displaystyle \forall \alpha .\alpha \rightarrow \alpha }
, while the
others are more specific and can be derived from the general one by consistently
replacing another type for the type parameter, i.e. the quantified
variable
α
{\displaystyle \alpha }
. The counter-example fails because the
replacement is not consistent.
The consistent replacement can be made formal by applying a substitution
S
=
{
a
i
↦
τ
i
,
…
}
{\displaystyle S=\left\{\ a_{i}\mapsto \tau _{i},\ \dots \ \right\}}
to the term of a type
τ
{\displaystyle \tau }
, written
S
τ
{\displaystyle S\tau }
. As the example suggests, substitution is not only strongly related to an order, that expresses that a type is more or less special, but also with the all-quantification which allows the substitution to be applied.
Formally, in HM, a type
σ
′
{\displaystyle \sigma '}
is more general than
σ
{\displaystyle \sigma }
, formally
σ
′
⊑
σ
{\displaystyle \sigma '\sqsubseteq \sigma }
, if some quantified variable in
σ
′
{\displaystyle \sigma '}
is consistently substituted such that one gains
σ
{\displaystyle \sigma }
as shown in the side bar. This order is part of the type definition of the type system.
In our previous example, applying the substitution
S
=
{
α
↦
string
}
{\displaystyle S=\left\{\alpha \mapsto {\texttt {string}}\right\}}
would result in
∀
α
.
α
→
α
⊑
string
→
string
{\displaystyle \forall \alpha .\alpha \rightarrow \alpha \sqsubseteq {\texttt {string}}\rightarrow {\texttt {string}}}
.
While substituting a monomorphic (ground) type for a quantified variable is
straight forward, substituting a polytype has some pitfalls caused by the
presence of free variables. Most particularly, unbound variables must not be
replaced. They are treated as constants here. Additionally, quantifications can only occur top-level. Substituting a parametric type,
one has to lift its quantifiers. The table on the right makes the rule precise.
Alternatively, consider an equivalent notation for the polytypes without
quantifiers in which quantified variables are represented by a different set of
symbols. In such a notation, the specialization reduces to plain consistent
replacement of such variables.
The relation
⊑
{\displaystyle \sqsubseteq }
is a partial order
and
∀
α
.
α
{\displaystyle \forall \alpha .\alpha }
is its smallest element.
==== Principal type ====
While specialization of a type scheme is one use of the order, it plays a
crucial second role in the type system. Type inference with polymorphism
faces the challenge of summarizing all possible types an expression may have.
The order guarantees that such a summary exists as the most general type
of the expression.
==== Substitution in typings ====
The type order defined above can be extended to typings because the implied all-quantification of typings enables consistent replacement:
Γ
⊢
e
:
σ
⟹
S
Γ
⊢
e
:
S
σ
{\displaystyle \Gamma \vdash e:\sigma \quad \Longrightarrow \quad S\Gamma \vdash e:S\sigma }
Contrary to the specialisation rule, this is not part of the definition, but like the implicit all-quantification rather a consequence of the type rules defined next.
Free type variables in a typing serve as placeholders for possible refinement. The binding effect of the environment to free type
variables on the right hand side of
⊢
{\displaystyle \vdash }
that prohibits their substitution in the specialisation rule is again
that a replacement has to be consistent and would need to include the whole typing.
This article will discuss four different rule sets:
⊢
D
{\displaystyle \vdash _{D}}
declarative system
⊢
S
{\displaystyle \vdash _{S}}
syntactical system
⊢
J
{\displaystyle \vdash _{J}}
algorithm J
⊢
W
{\displaystyle \vdash _{W}}
algorithm W
=== Deductive system ===
The syntax of HM is carried forward to the syntax of the inference rules that form the body of the formal system, by using the typings as judgments. Each of the rules define what conclusion could be drawn from what premises. Additionally to the judgments, some extra conditions introduced above might be used as premises, too.
A proof using the rules is a sequence of judgments such that all premises are listed before a conclusion. The examples below show a possible format of proofs. From left to right, each line shows the conclusion, the
[
N
a
m
e
]
{\displaystyle [{\mathtt {Name}}]}
of the rule applied and the premises, either by referring to an earlier line (number) if the premise is a judgment or by making the predicate explicit.
==== Typing rules ====
See also Typing rules
The side box shows the deduction rules of the HM type system. One can roughly divide the rules into two groups:
The first four rules
[
V
a
r
]
{\displaystyle [{\mathtt {Var}}]}
(variable or function access),
[
A
p
p
]
{\displaystyle [{\mathtt {App}}]}
(application, i.e. function call with one parameter),
[
A
b
s
]
{\displaystyle [{\mathtt {Abs}}]}
(abstraction, i.e. function declaration) and
[
L
e
t
]
{\displaystyle [{\mathtt {Let}}]}
(variable declaration) are centered around the syntax, presenting one rule for each of the expression forms. Their meaning is obvious at the first glance, as they decompose each expression, prove their sub-expressions and finally combine the individual types found in the premises to the type in the conclusion.
The second group is formed by the remaining two rules
[
I
n
s
t
]
{\displaystyle [{\mathtt {Inst}}]}
and
[
G
e
n
]
{\displaystyle [{\mathtt {Gen}}]}
.
They handle specialization and generalization of types. While the rule
[
I
n
s
t
]
{\displaystyle [{\mathtt {Inst}}]}
should be clear from the section on specialization above,
[
G
e
n
]
{\displaystyle [{\mathtt {Gen}}]}
complements the former, working in the opposite direction. It allows generalization, i.e. to quantify monotype variables not bound in the context.
The following two examples exercise the rule system in action. Since both the expression and the type are given, they are a type-checking use of the rules.
Example: A proof for
Γ
⊢
D
i
d
(
n
)
:
i
n
t
{\displaystyle \Gamma \vdash _{D}id(n):int}
where
Γ
=
i
d
:
∀
α
.
α
→
α
,
n
:
i
n
t
{\displaystyle \Gamma =id:\forall \alpha .\alpha \rightarrow \alpha ,\ n:int}
,
could be written
1
:
Γ
⊢
D
i
d
:
∀
α
.
α
→
α
[
V
a
r
]
(
i
d
:
∀
α
.
α
→
α
∈
Γ
)
2
:
Γ
⊢
D
i
d
:
i
n
t
→
i
n
t
[
I
n
s
t
]
(
1
)
,
(
∀
α
.
α
→
α
⊑
i
n
t
→
i
n
t
)
3
:
Γ
⊢
D
n
:
i
n
t
[
V
a
r
]
(
n
:
i
n
t
∈
Γ
)
4
:
Γ
⊢
D
i
d
(
n
)
:
i
n
t
[
A
p
p
]
(
2
)
,
(
3
)
{\displaystyle {\begin{array}{llll}1:&\Gamma \vdash _{D}id:\forall \alpha .\alpha \rightarrow \alpha &[{\mathtt {Var}}]&(id:\forall \alpha .\alpha \rightarrow \alpha \in \Gamma )\\2:&\Gamma \vdash _{D}id:int\rightarrow int&[{\mathtt {Inst}}]&(1),\ (\forall \alpha .\alpha \rightarrow \alpha \sqsubseteq int\rightarrow int)\\3:&\Gamma \vdash _{D}n:int&[{\mathtt {Var}}]&(n:int\in \Gamma )\\4:&\Gamma \vdash _{D}id(n):int&[{\mathtt {App}}]&(2),\ (3)\\\end{array}}}
Example: To demonstrate generalization,
⊢
D
let
i
d
=
λ
x
.
x
in
i
d
:
∀
α
.
α
→
α
{\displaystyle \vdash _{D}\ {\textbf {let}}\,id=\lambda x.x\ {\textbf {in}}\ id\,:\,\forall \alpha .\alpha \rightarrow \alpha }
is shown below:
1
:
x
:
α
⊢
D
x
:
α
[
V
a
r
]
(
x
:
α
∈
{
x
:
α
}
)
2
:
⊢
D
λ
x
.
x
:
α
→
α
[
A
b
s
]
(
1
)
3
:
i
d
:
α
→
α
⊢
D
i
d
:
α
→
α
[
V
a
r
]
(
i
d
:
α
→
α
∈
{
i
d
:
α
→
α
}
)
4
:
⊢
D
let
i
d
=
λ
x
.
x
in
i
d
:
α
→
α
[
L
e
t
]
(
2
)
,
(
3
)
5
:
⊢
D
let
i
d
=
λ
x
.
x
in
i
d
:
∀
α
.
α
→
α
[
G
e
n
]
(
4
)
,
(
α
∉
f
r
e
e
(
ϵ
)
)
{\displaystyle {\begin{array}{llll}1:&x:\alpha \vdash _{D}x:\alpha &[{\mathtt {Var}}]&(x:\alpha \in \left\{x:\alpha \right\})\\2:&\vdash _{D}\lambda x.x:\alpha \rightarrow \alpha &[{\mathtt {Abs}}]&(1)\\3:&id:\alpha \rightarrow \alpha \vdash _{D}id:\alpha \rightarrow \alpha &[{\mathtt {Var}}]&(id:\alpha \rightarrow \alpha \in \left\{id:\alpha \rightarrow \alpha \right\})\\4:&\vdash _{D}{\textbf {let}}\,id=\lambda x.x\ {\textbf {in}}\ id\,:\,\alpha \rightarrow \alpha &[{\mathtt {Let}}]&(2),\ (3)\\5:&\vdash _{D}{\textbf {let}}\,id=\lambda x.x\ {\textbf {in}}\ id\,:\,\forall \alpha .\alpha \rightarrow \alpha &[{\mathtt {Gen}}]&(4),\ (\alpha \not \in free(\epsilon ))\\\end{array}}}
=== Let-polymorphism ===
Not visible immediately, the rule set encodes a regulation under which circumstances a type might be generalized or not by a slightly varying use of mono- and polytypes in the rules
[
A
b
s
]
{\displaystyle [{\mathtt {Abs}}]}
and
[
L
e
t
]
{\displaystyle [{\mathtt {Let}}]}
. Remember that
σ
{\displaystyle \sigma }
and
τ
{\displaystyle \tau }
denote poly- and monotypes respectively.
In rule
[
A
b
s
]
{\displaystyle [{\mathtt {Abs}}]}
, the value variable of the parameter of the function
λ
x
.
e
{\displaystyle \lambda x.e}
is added to the context with a monomorphic type through the premise
Γ
,
x
:
τ
⊢
D
e
:
τ
′
{\displaystyle \Gamma ,\ x:\tau \vdash _{D}e:\tau '}
, while in the rule
[
L
e
t
]
{\displaystyle [{\mathtt {Let}}]}
, the variable enters the environment in polymorphic form
Γ
,
x
:
σ
⊢
D
e
1
:
τ
{\displaystyle \Gamma ,\ x:\sigma \vdash _{D}e_{1}:\tau }
. Though in both cases the presence of
x
{\displaystyle x}
in the context prevents the use of the generalisation rule for any free variable in the assignment, this regulation forces the type of parameter
x
{\displaystyle x}
in a
λ
{\displaystyle \lambda }
-expression to remain monomorphic, while in a let-expression, the variable could be introduced polymorphic, making specializations possible.
As a consequence of this regulation,
λ
f
.
(
f
true
,
f
0
)
{\displaystyle \lambda f.(f\,{\textrm {true}},f\,{\textrm {0}})}
cannot be typed,
since the parameter
f
{\displaystyle f}
is in a monomorphic position, while
let
f
=
λ
x
.
x
in
(
f
true
,
f
0
)
{\displaystyle {\textbf {let}}\ f=\lambda x.x\,{\textbf {in}}\,(f\,{\textrm {true}},f\,{\textrm {0}})}
has type
(
b
o
o
l
,
i
n
t
)
{\displaystyle (bool,int)}
, because
f
{\displaystyle f}
has been introduced in a let-expression and is treated polymorphic therefore.
=== Generalization rule ===
The generalisation rule is also worth a closer look. Here, the all-quantification implicit in the premise
Γ
⊢
D
e
:
σ
{\displaystyle \Gamma \vdash _{D}e:\sigma }
is simply moved to the right hand side of
⊢
D
{\displaystyle \vdash _{D}}
in the conclusion, bound by an explicit universal quantifier. This is possible, since
α
{\displaystyle \alpha }
does not occur free in the context. Again, while this makes the generalization rule plausible, it is not really a consequence. On the contrary, the generalization rule is part of the definition of HM's type system and the implicit all-quantification a consequence.
== An inference algorithm ==
Now that the deduction system of HM is at hand, one could present an algorithm and validate it with respect to the rules.
Alternatively, it might be possible to derive it by taking a closer look on how the rules interact and proof are
formed. This is done in the remainder of this article focusing on the possible decisions one can make while proving a typing.
=== Degrees of freedom choosing the rules ===
Isolating the points in a proof, where no decision is possible at all,
the first group of rules centered around the syntax leaves no choice since
to each syntactical rule corresponds a unique typing rule, which determines
a part of the proof, while between the conclusion and the premises of these
fixed parts chains of
[
I
n
s
t
]
{\displaystyle [{\mathtt {Inst}}]}
and
[
G
e
n
]
{\displaystyle [{\mathtt {Gen}}]}
could occur. Such a chain could also exist between the conclusion of the
proof and the rule for topmost expression. All proofs must have
the so sketched shape.
Because the only choice in a proof with respect of rule selection are the
[
I
n
s
t
]
{\displaystyle [{\mathtt {Inst}}]}
and
[
G
e
n
]
{\displaystyle [{\mathtt {Gen}}]}
chains, the
form of the proof suggests the question whether it can be made more precise,
where these chains might not be needed. This is in fact possible and leads to a
variant of the rules system with no such rules.
=== Syntax-directed rule system ===
A contemporary treatment of HM uses a purely syntax-directed rule system due to
Clement
as an intermediate step. In this system, the specialization is located directly after the original
[
V
a
r
]
{\displaystyle [{\mathtt {Var}}]}
rule
and merged into it, while the generalization becomes part of the
[
L
e
t
]
{\displaystyle [{\mathtt {Let}}]}
rule. There the generalization is
also determined to always produce the most general type by introducing the function
Γ
¯
(
τ
)
{\displaystyle {\bar {\Gamma }}(\tau )}
, which quantifies
all monotype variables not bound in
Γ
{\displaystyle \Gamma }
.
Formally, to validate that this new rule system
⊢
S
{\displaystyle \vdash _{S}}
is equivalent to the original
⊢
D
{\displaystyle \vdash _{D}}
, one has
to show that
Γ
⊢
D
e
:
σ
⇔
Γ
⊢
S
e
:
σ
{\displaystyle \Gamma \vdash _{D}\ e:\sigma \Leftrightarrow \Gamma \vdash _{S}\ e:\sigma }
, which decomposes into two sub-proofs:
Γ
⊢
D
e
:
σ
⇐
Γ
⊢
S
e
:
σ
{\displaystyle \Gamma \vdash _{D}\ e:\sigma \Leftarrow \Gamma \vdash _{S}\ e:\sigma }
(Consistency)
Γ
⊢
D
e
:
σ
⇒
Γ
⊢
S
e
:
σ
{\displaystyle \Gamma \vdash _{D}\ e:\sigma \Rightarrow \Gamma \vdash _{S}\ e:\sigma }
(Completeness)
While consistency can be seen by decomposing the rules
[
L
e
t
]
{\displaystyle [{\mathtt {Let}}]}
and
[
V
a
r
]
{\displaystyle [{\mathtt {Var}}]}
of
⊢
S
{\displaystyle \vdash _{S}}
into proofs in
⊢
D
{\displaystyle \vdash _{D}}
, it is likely visible that
⊢
S
{\displaystyle \vdash _{S}}
is incomplete, as
one cannot show
λ
x
.
x
:
∀
α
.
α
→
α
{\displaystyle \lambda \ x.x:\forall \alpha .\alpha \rightarrow \alpha }
in
⊢
S
{\displaystyle \vdash _{S}}
, for instance, but only
λ
x
.
x
:
α
→
α
{\displaystyle \lambda \ x.x:\alpha \rightarrow \alpha }
. An only slightly weaker version of completeness is provable
though, namely
Γ
⊢
D
e
:
σ
⇒
Γ
⊢
S
e
:
τ
∧
Γ
¯
(
τ
)
⊑
σ
{\displaystyle \Gamma \vdash _{D}\ e:\sigma \Rightarrow \Gamma \vdash _{S}\ e:\tau \wedge {\bar {\Gamma }}(\tau )\sqsubseteq \sigma }
implying, one can derive the principal type for an expression in
⊢
S
{\displaystyle \vdash _{S}}
allowing us to generalize the proof in the end.
Comparing
⊢
D
{\displaystyle \vdash _{D}}
and
⊢
S
{\displaystyle \vdash _{S}}
, now only monotypes appear in the judgments of all rules. Additionally, the shape of any possible proof with the deduction system is now identical to the shape of the expression (both seen as trees). Thus the expression fully determines the shape of the proof. In
⊢
D
{\displaystyle \vdash _{D}}
the shape would likely be determined with respect to all rules except
[
I
n
s
t
]
{\displaystyle [{\mathtt {Inst}}]}
and
[
G
e
n
]
{\displaystyle [{\mathtt {Gen}}]}
, which allow building arbitrarily long branches (chains) between the other nodes.
=== Degrees of freedom instantiating the rules ===
Now that the shape of the proof is known, one is already close to formulating a type inference algorithm.
Because any proof for a given expression must have the same shape, one can assume the monotypes in the
proof's judgements to be undetermined and consider how to determine them.
Here, the substitution (specialisation) order comes into play. Although at the first glance one cannot determine the types locally, the hope is that it is possible to refine them with the help of the order while traversing the proof tree, additionally assuming, because the resulting algorithm is to become an inference method, that the type in any premise will be determined as the best possible. And in fact, one can, as looking at the rules of
⊢
S
{\displaystyle \vdash _{S}}
suggests:
[Abs]: The critical choice is τ. At this point, nothing is known about τ, so one can only assume the most general type, which is
∀
α
.
α
{\displaystyle \forall \alpha .\alpha }
. The plan is to specialize the type if it should become necessary. Unfortunately, a polytype is not permitted in this place, so some α has to do for the moment. To avoid unwanted captures, a type variable not yet in the proof is a safe choice. Additionally, one has to keep in mind that this monotype is not yet fixed, but might be further refined.
[Var]: The choice is how to refine σ. Because any choice of a type τ here depends on the usage of the variable, which is not locally known, the safest bet is the most general one. Using the same method as above one can instantiate all quantified variables in σ with fresh monotype variables, again keeping them open to further refinement.
[Let]: The rule does not leave any choice. Done.
[App]: Only the application rule might force a refinement to the variables "opened" so far, as required by both premises.
The first premise forces the outcome of the inference to be of the form
τ
→
τ
′
{\displaystyle \tau \rightarrow \tau '}
.
If it is, then fine. One can later pick its τ' for the result.
If not, it might be an open variable. Then this can be refined to the required form with two new variables as before.
Otherwise, the type checking fails because the first premise inferred a type which is not and cannot be made into a function type.
The second premise requires that the inferred type is equal to τ of the first premise. Now there are two possibly different types, perhaps with open type variables, at hand to compare and to make equal if it is possible. If it is, a refinement is found, and if not, a type error is detected again. An effective method is known to "make two terms equal" by substitution, Robinson's Unification in combination with the so-called Union-Find algorithm.
To briefly summarize the union-find algorithm, given the set of all types in a proof, it allows one to group them together into equivalence classes by means of a union
procedure and to pick a representative for each such class using a find procedure. Emphasizing the word procedure in the sense of side effect, we're clearly leaving the realm of logic in order to prepare an effective algorithm. The representative of a
u
n
i
o
n
(
a
,
b
)
{\displaystyle {\mathtt {union}}(a,b)}
is determined such that, if both a and b are type variables then the representative is arbitrarily one of them, but while uniting a variable and a term, the term becomes the representative. Assuming an implementation of union-find at hand, one can formulate the unification of two monotypes as follows:
unify(ta, tb):
ta = find(ta)
tb = find(tb)
if both ta,tb are terms of the form D p1..pn with identical D,n then
unify(ta[i], tb[i]) for each corresponding ith parameter
else
if at least one of ta,tb is a type variable then
union(ta, tb)
else
error 'types do not match'
Now having a sketch of an inference algorithm at hand, a more formal presentation is given in the next section. It is described in Milner P. 370 ff. as algorithm J.
=== Algorithm J ===
The presentation of Algorithm J is a misuse of the notation of logical rules, since it includes side effects but allows a direct comparison with
⊢
S
{\displaystyle \vdash _{S}}
while expressing an efficient implementation at the same time. The rules now specify a procedure with parameters
Γ
,
e
{\displaystyle \Gamma ,e}
yielding
τ
{\displaystyle \tau }
in the conclusion where the execution of the premises proceeds from left to right.
The procedure
i
n
s
t
(
σ
)
{\displaystyle inst(\sigma )}
specializes the polytype
σ
{\displaystyle \sigma }
by copying the term and replacing the bound type variables consistently by new monotype variables. '
n
e
w
v
a
r
{\displaystyle newvar}
' produces a new monotype variable. Likely,
Γ
¯
(
τ
)
{\displaystyle {\bar {\Gamma }}(\tau )}
has to copy the type introducing new variables for the quantification to avoid unwanted captures. Overall, the algorithm now proceeds by always making the most general choice leaving the specialization to the unification, which by itself produces the most general result. As noted above, the final result
τ
{\displaystyle \tau }
has to be generalized to
Γ
¯
(
τ
)
{\displaystyle {\bar {\Gamma }}(\tau )}
in the end, to gain the most general type for a given expression.
Because the procedures used in the algorithm have nearly O(1) cost, the overall cost of the algorithm is close to linear in the size of the expression for which a type is to be inferred. This is in strong contrast to many other attempts to derive type inference algorithms, which often came out to be NP-hard, if not undecidable with respect to termination. Thus the HM performs as well as the best fully informed type-checking algorithms can. Type-checking here means that an algorithm does not have to find a proof, but only to validate a given one.
Efficiency is slightly reduced because the binding of type variables in the context has to be maintained to allow computation of
Γ
¯
(
τ
)
{\displaystyle {\bar {\Gamma }}(\tau )}
and enable an occurs check to prevent the building of recursive types during
u
n
i
f
y
(
α
,
τ
)
{\displaystyle {\mathit {unify}}(\alpha ,\tau )}
.
An example of such a case is
λ
x
.
(
x
x
)
{\displaystyle \lambda \ x.(x\ x)}
, for which no type can be derived using HM. Practically, types are only small terms and do not build up expanding structures. Thus, in complexity analysis, one can treat comparing them as a constant, retaining O(1) costs.
== Proving the algorithm ==
In the previous section, while sketching the algorithm its proof was hinted at with metalogical argumentation. While this leads to an efficient algorithm J, it is not clear whether the algorithm properly reflects the deduction systems D or S which serve as a semantic base line.
The most critical point in the above argumentation is the refinement of monotype
variables bound by the context. For instance, the algorithm boldly changes the
context while inferring e.g.
λ
f
.
(
f
1
)
{\displaystyle \lambda f.(f\ 1)}
,
because the monotype variable added to the context for the parameter
f
{\displaystyle f}
later needs to be refined
to
i
n
t
→
β
{\displaystyle int\rightarrow \beta }
when handling application.
The problem is that the deduction rules do not allow such a refinement.
Arguing that the refined type could have been added earlier instead of the
monotype variable is an expedient at best.
The key to reaching a formally satisfying argument is to properly include
the context within the refinement. Formally,
typing is compatible with substitution of free type variables.
Γ
⊢
S
e
:
τ
⟹
S
Γ
⊢
S
e
:
S
τ
{\displaystyle \Gamma \vdash _{S}e:\tau \quad \Longrightarrow \quad S\Gamma \vdash _{S}e:S\tau }
To refine the free variables thus means to refine the whole typing.
=== Algorithm W ===
From there, a proof of algorithm J leads to algorithm W, which only makes the
side effects imposed by the procedure
union
{\displaystyle {\textit {union}}}
explicit by
expressing its serial composition by means of the substitutions
S
i
{\displaystyle S_{i}}
. The presentation of algorithm W in the sidebar still makes use of side effects
in the operations set in italic, but these are now limited to generating
fresh symbols. The form of judgement is
Γ
⊢
e
:
τ
,
S
{\displaystyle \Gamma \vdash e:\tau ,S}
,
denoting a function with a context and expression as parameter producing a monotype together with
a substitution.
mgu
{\displaystyle {\textsf {mgu}}}
is a side-effect free version
of
union
{\displaystyle {\textit {union}}}
producing a substitution which is the most general unifier.
While algorithm W is normally considered to be the HM algorithm and is
often directly presented after the rule system in literature, its purpose is
described by Milner on P. 369 as follows:
As it stands, W is hardly an efficient algorithm; substitutions are applied too often. It was formulated to aid the proof of soundness. We now present a simpler algorithm J which simulates W in a precise sense.
While he considered W more complicated and less efficient, he presented it
in his publication before J. It has its merits when side effects are unavailable or unwanted.
W is also needed to prove completeness, which is factored by him into the soundness proof.
=== Proof obligations ===
Before formulating the proof obligations, a deviation between the rules systems D and S and the algorithms presented needs to be emphasized.
While the development above sort of misused the monotypes as "open" proof variables, the possibility that proper monotype variables might be harmed was sidestepped by introducing fresh variables and hoping for the best. But there's a catch: One of the promises made was that these fresh variables would be "kept in mind" as such. This promise is not fulfilled by the algorithm.
Having a context
1
:
i
n
t
,
f
:
α
{\displaystyle 1:int,\ f:\alpha }
, the expression
f
1
{\displaystyle f\ 1}
cannot be typed in either
⊢
D
{\displaystyle \vdash _{D}}
or
⊢
S
{\displaystyle \vdash _{S}}
, but the algorithms come up with
the type
β
{\displaystyle \beta }
, where W additionally delivers the substitution
{
α
↦
i
n
t
→
β
}
{\displaystyle \left\{\alpha \mapsto int\rightarrow \beta \right\}}
,
meaning that the algorithm fails to detect all type errors. This omission can easily be fixed by more carefully distinguishing proof
variables and monotype variables.
The authors were well aware of the problem but decided not to fix it. One might assume a pragmatic reason behind this.
While more properly implementing the type inference would have enabled the algorithm to deal with abstract monotypes,
they were not needed for the intended application where none of the items in a preexisting context have free
variables. In this light, the unneeded complication was dropped in favor of a simpler algorithm.
The remaining downside is that the proof of the algorithm with respect to the rule system is less general and can only be made
for contexts with
f
r
e
e
(
Γ
)
=
∅
{\displaystyle free(\Gamma )=\emptyset }
as a side condition.
(Correctness)
Γ
⊢
W
e
:
τ
,
S
⟹
Γ
⊢
S
e
:
τ
(Completeness)
Γ
⊢
S
e
:
τ
⟹
Γ
⊢
W
e
:
τ
′
,
S
forall
τ
where
∅
¯
(
τ
′
)
⊑
τ
{\displaystyle {\begin{array}{lll}{\text{(Correctness)}}&\Gamma \vdash _{W}e:\tau ,S&\quad \Longrightarrow \quad \Gamma \vdash _{S}e:\tau \\{\text{(Completeness)}}&\Gamma \vdash _{S}e:\tau &\quad \Longrightarrow \quad \Gamma \vdash _{W}e:\tau ',S\quad \quad {\text{forall}}\ \tau \ {\text{where}}\ {\overline {\emptyset }}(\tau ')\sqsubseteq \tau \end{array}}}
The side condition in the completeness obligation addresses how the deduction may give many types, while the algorithm always produces one. At the same time, the side condition demands that the type inferred is actually the most general.
To properly prove the obligations one needs to strengthen them first to allow activating the substitution lemma threading the substitution
S
{\displaystyle S}
through
⊢
S
{\displaystyle \vdash _{S}}
and
⊢
W
{\displaystyle \vdash _{W}}
. From there, the proofs are by induction over the expression.
Another proof obligation is the substitution lemma itself, i.e. the substitution of the typing, which finally establishes the all-quantification. The later cannot formally be proven, since no such syntax is at hand.
== Extensions ==
=== Recursive definitions ===
To make programming practical recursive functions are needed.
A central property of the lambda calculus is that recursive definitions
are not directly available, but can instead be expressed with a fixed point combinator.
But unfortunately, the fixpoint combinator cannot be formulated in a typed version
of the lambda calculus without having a disastrous effect on the system as outlined
below.
==== Typing rule ====
The original paper shows recursion can be realized by a combinator
f
i
x
:
∀
α
.
(
α
→
α
)
→
α
{\displaystyle {\mathit {fix}}:\forall \alpha .(\alpha \rightarrow \alpha )\rightarrow \alpha }
. A possible recursive definition could thus be formulated as
r
e
c
v
=
e
1
i
n
e
2
::=
l
e
t
v
=
f
i
x
(
λ
v
.
e
1
)
i
n
e
2
{\displaystyle {\mathtt {rec}}\ v=e_{1}\ {\mathtt {in}}\ e_{2}\ ::={\mathtt {let}}\ v={\mathit {fix}}(\lambda v.e_{1})\ {\mathtt {in}}\ e_{2}}
.
Alternatively an extension of the expression syntax and an extra typing rule is possible:
Γ
,
Γ
′
⊢
e
1
:
τ
1
…
Γ
,
Γ
′
⊢
e
n
:
τ
n
Γ
,
Γ
″
⊢
e
:
τ
Γ
⊢
r
e
c
v
1
=
e
1
a
n
d
…
a
n
d
v
n
=
e
n
i
n
e
:
τ
[
R
e
c
]
{\displaystyle \displaystyle {\frac {\Gamma ,\Gamma '\vdash e_{1}:\tau _{1}\quad \dots \quad \Gamma ,\Gamma '\vdash e_{n}:\tau _{n}\quad \Gamma ,\Gamma ''\vdash e:\tau }{\Gamma \ \vdash \ {\mathtt {rec}}\ v_{1}=e_{1}\ {\mathtt {and}}\ \dots \ {\mathtt {and}}\ v_{n}=e_{n}\ {\mathtt {in}}\ e:\tau }}\quad [{\mathtt {Rec}}]}
where
Γ
′
=
v
1
:
τ
1
,
…
,
v
n
:
τ
n
{\displaystyle \Gamma '=v_{1}:\tau _{1},\ \dots ,\ v_{n}:\tau _{n}}
Γ
″
=
v
1
:
Γ
¯
(
τ
1
)
,
…
,
v
n
:
Γ
¯
(
τ
n
)
{\displaystyle \Gamma ''=v_{1}:{\bar {\Gamma }}(\ \tau _{1}\ ),\ \dots ,\ v_{n}:{\bar {\Gamma }}(\ \tau _{n}\ )}
basically merging
[
A
b
s
]
{\displaystyle [{\mathtt {Abs}}]}
and
[
L
e
t
]
{\displaystyle [{\mathtt {Let}}]}
while including the recursively defined
variables in monotype positions where they occur to the left of the
i
n
{\displaystyle {\mathtt {in}}}
but as polytypes to the right of it.
==== Consequences ====
While the above is straightforward it does come at a price.
Type theory connects lambda calculus with computation and logic.
The easy modification above has effects on both:
The strong normalisation property is invalidated, because non-terminating terms can be formulated.
The logic collapses because the type
∀
a
.
a
{\displaystyle \forall a.a}
becomes inhabited.
=== Overloading ===
Overloading means that different functions can be defined and used with the same name. Most programming languages at least provide overloading with the built-in arithmetic operations (+, <, etc.), to allow the programmer to write arithmetic expressions in the same form, even for different numerical types like int or real. Because a mixture of these different types within the same expression also demands for implicit conversion, overloading especially for these operations is often built into the programming language itself. In some languages, this feature is generalized and made available to the user, e.g. in C++.
While ad hoc overloading has been avoided in functional programming for the computation costs both in type checking and inference, a means to systematise overloading has been introduced that resembles both in form and naming to object oriented programming, but works one level upwards. "Instances" in this systematic are not objects (i.e. on value level), but rather types.
The quicksort example mentioned in the introduction uses the overloading in the orders, having the following type annotation in Haskell:
Herein, the type a is not only polymorphic, but also restricted to be an instance of some type class Ord, that provides the order predicates < and >= used in the functions body. The proper implementations of these predicates are then passed to quicksorts as additional parameters, as soon as quicksort is used on more concrete types providing a single implementation of the overloaded function quickSort.
Because the "classes" only allow a single type as their argument, the resulting type system can still provide inference. Additionally, the type classes can then be equipped with some kind of overloading order allowing one to arrange the classes as a lattice.
=== Higher-order types ===
Parametric polymorphism implies that types themselves are passed as parameters as if they were proper values. Passed as arguments to a proper functions, but also into "type functions" as in the "parametric" type constants, leads to the question how to more properly type types themselves. Higher-order types are used to create an even more expressive type system.
Unfortunately, unification is no longer decidable in the presence of meta types, rendering type inference impossible in this extend of generality. Additionally, assuming a type of all types that includes itself as type leads into a paradox, as in the set of all sets, so one must proceed in steps of levels of abstraction.
Research in second order lambda calculus, one step upwards, showed that type inference is undecidable in this generality.
Haskell introduces one higher level named kind. In standard Haskell, kinds are inferred and used for little more than to describe the arity of type constructors. e.g. a list type constructor is thought of as mapping a type (the type of its elements) to another type (the type of the list containing said elements); notationally this is expressed as
∗
→
∗
{\displaystyle *\to *}
. Language extensions are available which extend kinds to emulate features of a dependent type system.
=== Subtyping ===
Attempts to combine subtyping and type inference have caused quite some frustration.
It is straightforward to accumulate and propagate subtyping constraints (as opposed to type equality constraints), making the resulting constraints part of the inferred typing schemes,
for example
∀
α
.
(
α
≤
T
)
⇒
α
→
α
{\displaystyle \forall \alpha .\ (\alpha \leq T)\Rightarrow \alpha \rightarrow \alpha }
, where
α
≤
T
{\displaystyle \alpha \leq T}
is a constraint on the type variable
α
{\displaystyle \alpha }
.
However, because type variables are no longer unified eagerly in this approach, it tends to generate large and unwieldy typing schemes containing many useless type variables and constraints, making them hard to read and understand.
Therefore, considerable effort was put into simplifying such typing schemes and their constraints,
using techniques similar to those of nondeterministic finite automaton (NFA) simplification (useful in the presence of inferred recursive types).
More recently, Dolan and Mycroft
formalized the relationship between typing scheme simplification and NFA simplification
and showed that an algebraic take on the formalization of subtyping allowed generating compact principal typing schemes for an ML-like language (called MLsub).
Notably, their proposed typing scheme used a restricted form of union and intersection types instead of explicit constraints.
Parreaux later claimed
that this algebraic formulation was equivalent to a relatively simple algorithm resembling Algorithm W,
and that the use of union and intersection types was not essential.
On the other hand, type inference has proven more difficult in the context of object-oriented programming languages,
because object methods tend to require first-class polymorphism in the style of System F (where type inference is undecidable)
and because of features like F-bounded polymorphism.
Consequently, type systems with subtyping enabling object-oriented programming, such as Cardelli's system
F
<:
{\displaystyle F_{<:}}
, do not support HM-style type inference.
Row polymorphism can be used as an alternative to subtyping for supporting language features like structural records.
While this style of polymorphism is less flexible than subtyping in some ways, notably requiring more polymorphism than strictly necessary to cope with the lack of directionality in type constraints,
it has the advantage that it can be integrated with the standard HM algorithms quite easily.
== Notes ==
== References ==
== External links ==
A literate Haskell implementation of Algorithm W along with its source code on GitHub.
A simple implementation of Hindley-Milner algorithm in Python. | Wikipedia/Hindley–Milner_type_inference |
A production system (or production rule system) is a computer program typically used to provide some form of artificial intelligence, which consists primarily of a set of rules about behavior, but also includes the mechanism necessary to follow those rules as the system responds to states of the world. Those rules, termed productions, are a basic knowledge representation found useful in automated planning and scheduling, expert systems, and action selection.
Productions consist of two parts: a sensory precondition (or "IF" statement) and an action ("THEN"). If a production's precondition matches the current state of the world, then the production is said to be triggered. If a production's action is executed, it has fired. A production system also contains a database, sometimes called working memory, which maintains data about the current state or knowledge, and a rule interpreter. The rule interpreter must provide a mechanism for prioritizing productions when more than one is triggered.
== Basic operation ==
Rule interpreters generally execute a forward chaining algorithm for selecting productions to execute to meet current goals, which can include updating the system's data or beliefs. The condition portion of each rule (left-hand side or LHS) is tested against the current state of the working memory.
In idealized or data-oriented production systems, there is an assumption that any triggered conditions should be executed: the consequent actions (right-hand side or RHS) will update the agent's knowledge, removing or adding data to the working memory. The system stops processing either when the user interrupts the forward chaining loop; when a given number of cycles have been performed; when a "halt" RHS is executed, or when no rules have LHSs that are true.
Real-time and expert systems, in contrast, often have to choose between mutually exclusive productions—since actions take time, only one action can be taken, or (in the case of an expert system) recommended. In such systems, the rule interpreter, or inference engine, cycles through two steps: matching production rules against the database, followed by selecting which of the matched rules to apply and executing the selected actions.
== Matching production rules against working memory ==
Production systems may vary on the expressive power of conditions in production rules. Accordingly, the pattern matching algorithm that collects production rules with matched conditions may range from the naive—trying all rules in sequence, stopping at the first match—to the optimized, in which rules are "compiled" into a network of inter-related conditions.
The latter is illustrated by the Rete algorithm, designed by Charles L. Forgy in1974, which is used in a series of production systems, called OPS and originally developed at Carnegie Mellon University culminating in OPS5 in the early 1980s. OPS5 may be viewed as a full-fledged programming language for production system programming.
== Choosing which rules to evaluate ==
Production systems may also differ in the final selection of production rules to execute, or fire. The collection of rules resulting from the previous matching algorithm is called the conflict set , and the selection process is also called a conflict resolution strategy.
Here again, such strategies may vary from the simple—use the order in which production rules were written; assign weights or priorities to production rules and sort the conflict set accordingly—to the complex—sort the conflict set according to the times at which production rules were previously fired; or according to the extent of the modifications induced by their RHSs. Whichever conflict resolution strategy is implemented, the method is indeed crucial to the efficiency and correctness of the production system. Some systems simply fire all matching productions.
== Using production systems ==
The use of production systems varies from simple string rewriting rules to the modeling of human cognitive processes, from term rewriting and reduction systems to expert systems.
=== A simple string rewriting production system example ===
This example shows a set of production rules for reversing a string from an alphabet that does not contain the symbols "$" and "*" (which are used as marker symbols).
P1: $$ -> *
P2: *$ -> *
P3: *x -> x*
P4: * -> null & halt
P5: $xy -> y$x
P6: null -> $
In this example, production rules are chosen for testing according to their order in this production list. For each rule, the input string is examined from left to right with a moving window to find a match with the LHS of the production rule. When a match is found, the matched substring in the input string is replaced with the RHS of the production rule. In this production system, x and y are variables matching any character of the input string alphabet. Matching resumes with P1 once the replacement has been made.
The string "ABC", for instance, undergoes the following sequence of transformations under these production rules:
$ABC (P6)
B$AC (P5)
BC$A (P5)
$BC$A (P6)
C$B$A (P5)
$C$B$A (P6)
$$C$B$A (P6)
*C$B$A (P1)
C*$B$A (P3)
C*B$A (P2)
CB*$A (P3)
CB*A (P2)
CBA* (P3)
CBA (P4)
In such a simple system, the ordering of the production rules is crucial. Often, the lack of control structure makes production systems difficult to design. It is, of course, possible to add control structure to the production systems model, namely in the inference engine, or in the working memory.
=== An OPS5 production rule example ===
In a toy simulation world where a monkey in a room can grab different objects and climb on others, an example production rule to grab an object suspended from the ceiling would look like:
(p Holds::Object-Ceiling
{(goal ^status active ^type holds ^objid <O1>) <goal>}
{(physical-object
^id <O1>
^weight light
^at <p>
^on ceiling) <object-1>}
{(physical-object ^id ladder ^at <p> ^on floor) <object-2>}
{(monkey ^on ladder ^holds NIL) <monkey>}
-(physical-object ^on <O1>)
-->
(write (crlf) Grab <O1> (crlf))
(modify <object1> ^on NIL)
(modify <monkey> ^holds <O1>)
(modify <goal> ^status satisfied)
)
In this example, data in working memory is structured and variables appear between angle brackets. The name of the data structure, such as "goal" and "physical-object", is the first literal in conditions; the fields of a structure are prefixed with "^". The "-" indicates a negative condition.
Production rules in OPS5 apply to all instances of data structures that match conditions and conform to variable bindings. In this example, should several objects be suspended from the ceiling, each with a different ladder nearby supporting an empty-handed monkey, the conflict set would contain as many production rule instances derived from the same production "Holds::Object-Ceiling". The conflict resolution step would later select which production instances to fire.
The binding of variables resulting from the pattern matching in the LHS is used in the RHS to refer to the data to be modified. The working memory contains explicit control structure data in the form of "goal" data structure instances. In the example, once a monkey holds the suspended object, the status of the goal is set to "satisfied" and the same production rule can no longer apply as its first condition fails.
== Relationship with logic ==
Both Russell and Norvig's Artificial Intelligence: A Modern Approach and John Sowa's Knowledge Representation: Logical, Philosophical, and Computational Foundations characterize production systems as systems of logic that perform reasoning by means of forward chaining. However, Stewart Shapiro, reviewing Sowa's book, argues that this is a misrepresentation. Similarly, Kowalski and Sadri argue that, because actions in production systems are understood as imperatives, production systems do not have a logical semantics. Their logic and computer language Logic Production System (LPS) combines logic programs, interpreted as an agent's beliefs, with reactive rules, interpreted as an agent's goals. They argue that reactive rules in LPS give a logical semantics to production rules, which they otherwise lack. In the following example, lines 1-3 are type declarations, 4 describes the initial state, 5 is a reactive rule, 6-7 are logic program clauses, and 8 is a causal law:
1. fluents fire.
2. actions eliminate, escape.
3. events deal_with_fire.
4. initially fire.
5. if fire then deal_with_fire.
6. deal_with_fire if eliminate.
7. deal_with_fire if escape.
8. eliminate terminates fire.
Notice in this example that the reactive rule on line 5 is triggered, just like a production rule, but this time its conclusion deal_with_fire becomes a goal to be reduced to sub-goals using the logic programs on lines 6-7. These subgoals are actions (line 2), at least one of which needs to be executed to satisfy the goal.
== Related systems ==
Constraint Handling Rules: rule-based programming language.
CLIPS: public domain software tool for building expert systems.
JBoss Drools: an open-source business rule management system (BRMS).
ILOG rules: a business rule management system.
JESS: a rule engine for the Java platform - it is a superset of the CLIPS programming language.
Lisa: a rule engine written in Common Lisp.
OpenL Tablets: business centric rules and open source BRMS.
Prolog: a general purpose logic programming language.
ACT-R, Soar, OpenCog: cognitive architectures based on a production system.
== References ==
Brownston, L., Farrell R., Kant E. (1985). Programming Expert Systems in OPS5 Reading, Massachusetts: Addison-Wesley. ISBN 0-201-10647-7
Klahr, D., Langley, P. and Neches, R. (1987). Production System Models of Learning and Development. Cambridge, Mass.: The MIT Press.
Kowalski, R. and Sadri, F. (2016). Programming in logic without logic programming. Theory and Practice of Logic Programming, 16(3), 269-295.
Russell, S.J. and Norvig, P. (2016). Artificial Intelligence: A Modern Approach. Pearson Education Limited.
Sowa, J.F. (2000). Knowledge representation: logical, philosophical, and computational foundations (Vol. 13). Pacific Grove, CA: Brooks/Cole.
Waterman, D.A., Hayes-Roth, F. (1978). Pattern-Directed Inference Systems New York: Academic Press. ISBN 0-12-737550-3
== See also ==
Action selection mechanism
Expert system
Learning Classifier System
Logic programming
Inference engine
L-system
OPS5
Production Rule Representation
Rete algorithm
Rule-based machine learning
Term rewriting | Wikipedia/Production_system_(computer_science) |
Literate programming (LP) is a programming paradigm introduced in 1984 by Donald Knuth in which a computer program is given as an explanation of how it works in a natural language, such as English, interspersed (embedded) with snippets of macros and traditional source code, from which compilable source code can be generated. The approach is used in scientific computing and in data science routinely for reproducible research and open access purposes. Literate programming tools are used by millions of programmers today.
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 gives programmers macros to develop programs in the order demanded by the logic and flow of their thoughts. Literate programs are written as an exposition of logic in more natural language in which macros are used to hide abstractions and traditional source code, more like the text of an essay.
Literate programming 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 formatted documentation, which is said to be "woven" from the literate source. While the first generation of literate programming tools were computer language-specific, the later ones are language-agnostic and exist beyond the individual programming languages.
== History and philosophy ==
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 at Stanford University as a part of his research on algorithms and digital typography. 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. However, it resembles the complicated nature of software delicately pieced together from simple materials. The practice of literate programming has seen an important resurgence in the 2010s with the use of computational notebooks, especially in data science.
== Concept ==
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 the algorithms in pseudocode typically used in teaching computer science. These arbitrary explanatory phrases become precise new operators, created on the fly by the programmer, forming a meta-language on top of the underlying programming language.
A preprocessor is used to substitute arbitrary hierarchies, or rather "interconnected 'webs' of macros", 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.
=== Advantages ===
According to Knuth,
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. 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 of TeX code as a literate program.
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.
=== Contrast with documentation generation ===
Literate programming is very often misunderstood to refer only to formatted documentation produced from a common file with both source code and comments – which is properly called documentation 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 the Perl Plain Old Documentation or Java Javadoc systems, 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.
== Workflow ==
Implementing literate programming consists of two steps:
Weaving: Generating a comprehensive document about the program and its maintenance.
Tangling: Generating machine executable code
Weaving and tangling are done on the same source so that they are consistent with each other.
== Example ==
A classic example of literate programming is the literate implementation of the standard Unix wc word counting program. Knuth presented a CWEB version of this example in Chapter 12 of his Literate Programming book. The same example was later rewritten for the noweb literate programming tool. This example provides a good illustration of the basic elements of literate programming.
=== Creation of macros ===
The following snippet of the wc literate program 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 which, 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.
=== Program as a web ===
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 as if, while or case. This can be seen in the following wc literate program.
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 a web of various parts.
=== Order of human logic, not that of the compiler ===
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).
The grand totals must be initialized to zero at the beginning of the program.
If we made these variables local to main, we would have to do this initialization
explicitly; however, C globals are automatically zeroed. (Or rather,``statically
zeroed.'' (Get it?)
<<Global variables>>+=
long tot_word_count, tot_line_count,
tot_char_count;
/* total number of words, lines, chars */
@
=== Record of the train of thought ===
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 better communication of thought. The snippets of the literate wc above 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 the interactive fiction game Colossal Cave Adventure.
=== Remarkable examples ===
Axiom, which is evolved from scratchpad, a computer algebra system developed by IBM. It is now being developed by Tim Daly, one of the developers of scratchpad, Axiom is totally written as a literate program.
== Literate programming practices ==
The first published literate programming environment was WEB, introduced by Knuth in 1981 for his TeX typesetting system; it uses Pascal as its underlying programming language and TeX for typesetting of the documentation. The complete commented TeX source code was published in Knuth's TeX: The program, volume B of his 5-volume Computers and Typesetting. Knuth had privately used a literate programming system called DOC as early as 1979. He was inspired by the ideas of Pierre-Arnoul de Marneffe. The free CWEB, written by Knuth and Silvio Levy, is WEB adapted for C and C++, runs on most operating systems, and can produce TeX and PDF documentation.
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 the order of human logic principle, which makes them perhaps "semi-literate" tools. These, however, allow cellular execution of code which makes them more along the lines of exploratory programming tools.
Other useful tools include:
== See also ==
Documentation generator – the inverse on literate programming where documentation is embedded in and generated from source code
Notebook interface – virtual notebook environment used for literate programming
Sweave and Knitr – examples of use of the "noweb"-like Literate Programming tool inside the R language for creation of dynamic statistical reports
Self-documenting code – source code that can be easily understood without documentation
== References ==
== Further reading ==
== External links ==
LiterateProgramming at WikiWikiWeb
Literate Programming FAQ at CTAN | Wikipedia/Literate_programming |
In computer science, a purely functional data structure is a data structure that can be directly implemented in a purely functional language. The main difference between an arbitrary data structure and a purely functional one is that the latter is (strongly) immutable. This restriction ensures the data structure possesses the advantages of immutable objects: (full) persistency, quick copy of objects, and thread safety. Efficient purely functional data structures may require the use of lazy evaluation and memoization.
== Definition ==
Persistent data structures have the property of keeping previous versions of themselves unmodified. On the other hand, non-persistent structures such as arrays admit a destructive update, that is, an update which cannot be reversed. Once a program writes a value in some index of the array, its previous value can not be retrieved anymore.
Formally, a purely functional data structure is a data structure which can be implemented in a purely functional language, such as Haskell. In practice, it means that the data structures must be built using only persistent data structures such as tuples, sum types, product types, and basic types such as integers, characters, strings. Such a data structure is necessarily persistent. However, not all persistent data structures are purely functional.: 16 For example, a persistent array is a data-structure which is persistent and which is implemented using an array, thus is not purely functional.
In the book Purely functional data structures, Okasaki compares destructive updates to master chef's knives.: 2 Destructive updates cannot be undone, and thus they should not be used unless it is certain that the previous value is not required anymore. However, destructive updates can also allow efficiency that can not be obtained using other techniques. For example, a data structure using an array and destructive updates may be replaced by a similar data structure where the array is replaced by a map, a random access list, or a balanced tree, which admits a purely functional implementation. But the access cost may increase from constant time to logarithmic time.
== Ensuring that a data structure is purely functional ==
A data structure is never inherently functional. For example, a stack can be implemented as a singly-linked list. This implementation is purely functional as long as the only operations on the stack return a new stack without altering the old stack. However, if the language is not purely functional, the run-time system may be unable to guarantee immutability. This is illustrated by Okasaki,: 9–11 where he shows the concatenation of two singly-linked lists can still be done using an imperative setting.
In order to ensure that a data structure is used in a purely functional way in an impure functional language, modules or classes can be used to ensure manipulation via authorized functions only.
== Using purely functional data structures ==
One of the central challenges in adapting existing code to use purely functional data structures lies in the fact that mutable data
structures provide "hidden outputs" for functions that use them. Rewriting these functions to use purely functional data structures
requires adding these data structures as explicit outputs.
For instance, consider a function that accepts a mutable list, removes the first element from the list, and returns that element. In a purely functional setting, removing an element from the list produces a new and shorter list, but does not update the original one. In order to be useful, therefore, a purely functional version of this function is likely to have to return the new list along with the removed element. In the most general case, a program converted in this way must return the "state" or "store" of the program as an additional result from every function call. Such a program is said to be written in store-passing style.
== Examples ==
Here is a list of abstract data structures with purely functional implementations:
Stack (first in, last out) implemented as a singly linked list,
Queue, implemented as a real-time queue,
Double-ended queue, implemented as a real-time double-ended queue,
(Multi)set of ordered elements and map indexed by ordered keys, implemented as a red–black tree, or more generally by a search tree,
Priority queue, implemented as a Brodal queue
Random access list, implemented as a skew-binary random access list
Hash consing
Zipper (data structure)
== Design and implementation ==
In his book Purely Functional Data Structures, computer scientist Chris Okasaki describes techniques used to design and implement purely functional data structures, a small subset of which are summarized below.
=== Laziness and memoization ===
Lazy evaluation is particularly interesting in a purely functional language: 31 because the order of the evaluation never changes the result of a function. Therefore, lazy evaluation naturally becomes an important part of the construction of purely functional data structures. It allows a computation to be done only when its result is actually required. Therefore, the code of a purely functional data structure can, without loss of efficiency, consider similarly data that will effectively be used and data that will be ignored. The only computation required is for the first kind of data; that is what will actually be performed.
One of the key tools in building efficient, purely functional data structures is memoization.: 31 When a computation is done, it is saved and does not have to be performed a second time. This is particularly important in lazy implementations; additional evaluations may require the same result, but it is impossible to know which evaluation will require it first.
=== Amortized analysis and scheduling ===
Some data structures, even those that are not purely functional such as dynamic arrays, admit operations that are efficient most of the time (e.g., constant time for dynamic arrays), and rarely inefficient (e.g., linear time for dynamic arrays). Amortization can then be used to prove that the average running time of the operations is efficient.: 39 That is to say, the few inefficient operations are rare enough, and do not change the asymptotical evolution of time complexity when a sequence of operations is considered.
In general, having inefficient operations is not acceptable for persistent data structures, because this very operation can be called many times. It is not acceptable either for real-time or for imperative systems, where the user may require the time taken by the operation to be predictable. Furthermore, this unpredictability complicates the use of parallelism.: 83
In order to avoid those problems, some data structures allow for the inefficient operation to be postponed—this is called scheduling.: 84 The only requirement is that the computation of the inefficient operation should end before its result is actually needed. A constant part of the inefficient operation is performed simultaneously with the following call to an efficient operation, so that the inefficient operation is already totally done when it is needed, and each individual operation remains efficient.
==== Example: queue ====
Amortized queues: 65 : 73 are composed of two singly-linked lists: the front and the reversed rear. Elements are added to the rear list and are removed from the front list. Furthermore, whenever the front queue is empty, the rear queue is reversed and becomes the front, while the rear queue becomes empty. The amortized time complexity of each operation is constant. Each cell of the list is added, reversed and removed at most once. In order to avoid an inefficient operation where the rear list is reversed, real-time queues add the restriction that the rear list is only as long as the front list. To ensure that the front list stays longer than the rear list, the rear list is reversed and appended to the front list. Since this operation is inefficient, it is not performed immediately. Instead, it is spread out over the subsequent operations. Thus, each cell is computed before it is needed, and the new front list is totally computed before a new inefficient operation needs to be called.
== See also ==
Persistent data structure
== References ==
== External links ==
Purely Functional Data Structures thesis by Chris Okasaki (PDF format)
Making Data-Structures Persistent by James R. Driscoll, Neil Sarnak, Daniel D. Sleator, Robert E. Tarjan (PDF)
Fully Persistent Lists with Catenation by James R. Driscoll, Daniel D. Sleator, Robert E. Tarjan (PDF)
Persistent Data Structures from the MIT OpenCourseWare course Advanced Algorithms
What's new in purely functional data structures since Okasaki? on Theoretical Computer Science Stack Exchange | Wikipedia/Purely_functional_data_structure |
In mathematical logic, the lambda calculus (also written as λ-calculus) is a formal system for expressing computation based on function abstraction and application using variable binding and substitution. Untyped lambda calculus, the topic of this article, is a universal machine, a model of computation that can be used to simulate any Turing machine (and vice versa). It was introduced by the mathematician Alonzo Church in the 1930s as part of his research into the foundations of mathematics. In 1936, Church found a formulation which was logically consistent, and documented it in 1940.
Lambda calculus consists of constructing lambda terms and performing reduction operations on them. A term is defined as any valid lambda calculus expression. In the simplest form of lambda calculus, terms are built using only the following rules:
x
{\textstyle x}
: A variable is a character or string representing a parameter.
(
λ
x
.
M
)
{\textstyle (\lambda x.M)}
: A lambda abstraction is a function definition, taking as input the bound variable
x
{\displaystyle x}
(between the λ and the punctum/dot .) and returning the body
M
{\textstyle M}
.
(
M
N
)
{\textstyle (M\ N)}
: An application, applying a function
M
{\textstyle M}
to an argument
N
{\textstyle N}
. Both
M
{\textstyle M}
and
N
{\textstyle N}
are lambda terms.
The reduction operations include:
(
λ
x
.
M
[
x
]
)
→
(
λ
y
.
M
[
y
]
)
{\textstyle (\lambda x.M[x])\rightarrow (\lambda y.M[y])}
: α-conversion, renaming the bound variables in the expression. Used to avoid name collisions.
(
(
λ
x
.
M
)
N
)
→
(
M
[
x
:=
N
]
)
{\textstyle ((\lambda x.M)\ N)\rightarrow (M[x:=N])}
: β-reduction, replacing the bound variables with the argument expression in the body of the abstraction.
If De Bruijn indexing is used, then α-conversion is no longer required as there will be no name collisions. If repeated application of the reduction steps eventually terminates, then by the Church–Rosser theorem it will produce a β-normal form.
Variable names are not needed if using a universal lambda function, such as Iota and Jot, which can create any function behavior by calling it on itself in various combinations.
== Explanation and applications ==
Lambda calculus is Turing complete, that is, it is a universal model of computation that can be used to simulate any Turing machine. Its namesake, the Greek letter lambda (λ), is used in lambda expressions and lambda terms to denote binding a variable in a function.
Lambda calculus may be untyped or typed. In typed lambda calculus, functions can be applied only if they are capable of accepting the given input's "type" of data. Typed lambda calculi are strictly weaker than the untyped lambda calculus, which is the primary subject of this article, in the sense that typed lambda calculi can express less than the untyped calculus can. On the other hand, typed lambda calculi allow more things to be proven. For example, in simply typed lambda calculus, it is a theorem that every evaluation strategy terminates for every simply typed lambda-term, whereas evaluation of untyped lambda-terms need not terminate (see below). One reason there are many different typed lambda calculi has been the desire to do more (of what the untyped calculus can do) without giving up on being able to prove strong theorems about the calculus.
Lambda calculus has applications in many different areas in mathematics, philosophy, linguistics, and computer science. Lambda calculus has played an important role in the development of the theory of programming languages. Functional programming languages implement lambda calculus. Lambda calculus is also a current research topic in category theory.
== History ==
Lambda calculus was introduced by mathematician Alonzo Church in the 1930s as part of an investigation into the foundations of mathematics. The original system was shown to be logically inconsistent in 1935 when Stephen Kleene and J. B. Rosser developed the Kleene–Rosser paradox.
Subsequently, in 1936 Church isolated and published just the portion relevant to computation, what is now called the untyped lambda calculus. In 1940, he also introduced a computationally weaker, but logically consistent system, known as the simply typed lambda calculus.
Until the 1960s when its relation to programming languages was clarified, the lambda calculus was only a formalism. Thanks to Richard Montague and other linguists' applications in the semantics of natural language, the lambda calculus has begun to enjoy a respectable place in both linguistics and computer science.
=== Origin of the λ symbol ===
There is some uncertainty over the reason for Church's use of the Greek letter lambda (λ) as the notation for function-abstraction in the lambda calculus, perhaps in part due to conflicting explanations by Church himself. According to Cardone and Hindley (2006):
By the way, why did Church choose the notation "λ"? In [an unpublished 1964 letter to Harald Dickson] he stated clearly that it came from the notation "
x
^
{\displaystyle {\hat {x}}}
" used for class-abstraction by Whitehead and Russell, by first modifying "
x
^
{\displaystyle {\hat {x}}}
" to "
∧
x
{\displaystyle \land x}
" to distinguish function-abstraction from class-abstraction, and then changing "
∧
{\displaystyle \land }
" to "λ" for ease of printing.
This origin was also reported in [Rosser, 1984, p.338]. On the other hand, in his later years Church told two enquirers that the choice was more accidental: a symbol was needed and λ just happened to be chosen.
Dana Scott has also addressed this question in various public lectures.
Scott recounts that he once posed a question about the origin of the lambda symbol to Church's former student and son-in-law John W. Addison Jr., who then wrote his father-in-law a postcard:
Dear Professor Church,
Russell had the iota operator, Hilbert had the epsilon operator. Why did you choose lambda for your operator?
According to Scott, Church's entire response consisted of returning the postcard with the following annotation: "eeny, meeny, miny, moe".
== Informal description ==
=== Motivation ===
Computable functions are a fundamental concept within computer science and mathematics. The lambda calculus provides simple semantics for computation which are useful for formally studying properties of computation. The lambda calculus incorporates two simplifications that make its semantics simple.
The first simplification is that the lambda calculus treats functions "anonymously"; it does not give them explicit names. For example, the function
s
q
u
a
r
e
_
s
u
m
(
x
,
y
)
=
x
2
+
y
2
{\displaystyle \operatorname {square\_sum} (x,y)=x^{2}+y^{2}}
can be rewritten in anonymous form as
(
x
,
y
)
↦
x
2
+
y
2
{\displaystyle (x,y)\mapsto x^{2}+y^{2}}
(which is read as "a tuple of x and y is mapped to
x
2
+
y
2
{\textstyle x^{2}+y^{2}}
"). Similarly, the function
id
(
x
)
=
x
{\displaystyle \operatorname {id} (x)=x}
can be rewritten in anonymous form as
x
↦
x
{\displaystyle x\mapsto x}
where the input is simply mapped to itself.
The second simplification is that the lambda calculus only uses functions of a single input. An ordinary function that requires two inputs, for instance the
s
q
u
a
r
e
_
s
u
m
{\textstyle \operatorname {square\_sum} }
function, can be reworked into an equivalent function that accepts a single input, and as output returns another function, that in turn accepts a single input. For example,
(
x
,
y
)
↦
x
2
+
y
2
{\displaystyle (x,y)\mapsto x^{2}+y^{2}}
can be reworked into
x
↦
(
y
↦
x
2
+
y
2
)
{\displaystyle x\mapsto (y\mapsto x^{2}+y^{2})}
This method, known as currying, transforms a function that takes multiple arguments into a chain of functions each with a single argument.
Function application of the
s
q
u
a
r
e
_
s
u
m
{\textstyle \operatorname {square\_sum} }
function to the arguments (5, 2), yields at once
(
(
x
,
y
)
↦
x
2
+
y
2
)
(
5
,
2
)
{\textstyle ((x,y)\mapsto x^{2}+y^{2})(5,2)}
=
5
2
+
2
2
{\textstyle =5^{2}+2^{2}}
=
29
{\textstyle =29}
,
whereas evaluation of the curried version requires one more step
(
(
x
↦
(
y
↦
x
2
+
y
2
)
)
(
5
)
)
(
2
)
{\textstyle {\Bigl (}{\bigl (}x\mapsto (y\mapsto x^{2}+y^{2}){\bigr )}(5){\Bigr )}(2)}
=
(
y
↦
5
2
+
y
2
)
(
2
)
{\textstyle =(y\mapsto 5^{2}+y^{2})(2)}
// the definition of
x
{\displaystyle x}
has been used with
5
{\displaystyle 5}
in the inner expression. This is like β-reduction.
=
5
2
+
2
2
{\textstyle =5^{2}+2^{2}}
// the definition of
y
{\displaystyle y}
has been used with
2
{\displaystyle 2}
. Again, similar to β-reduction.
=
29
{\textstyle =29}
to arrive at the same result.
=== The lambda calculus ===
The lambda calculus consists of a language of lambda terms, that are defined by a certain formal syntax, and a set of transformation rules for manipulating the lambda terms. These transformation rules can be viewed as an equational theory or as an operational definition.
As described above, having no names, all functions in the lambda calculus are anonymous functions. They only accept one input variable, so currying is used to implement functions of several variables.
==== Lambda terms ====
The syntax of the lambda calculus defines some expressions as valid lambda calculus expressions and some as invalid, just as some strings of characters are valid computer programs and some are not. A valid lambda calculus expression is called a "lambda term".
The following three rules give an inductive definition that can be applied to build all syntactically valid lambda terms:
variable x is itself a valid lambda term.
if t is a lambda term, and x is a variable, then
(
λ
x
.
t
)
{\displaystyle (\lambda x.t)}
is a lambda term (called an abstraction);
if t and s are lambda terms, then
(
t
s
)
{\displaystyle (ts)}
is a lambda term (called an application).
Nothing else is a lambda term. That is, a lambda term is valid if and only if it can be obtained by repeated application of these three rules. For convenience, some parentheses can be omitted when writing a lambda term. For example, the outermost parentheses are usually not written. See § Notation, below, for an explicit description of which parentheses are optional. It is also common to extend the syntax presented here with additional operations, which allows making sense of terms such as
λ
x
.
x
2
.
{\displaystyle \lambda x.x^{2}.}
The focus of this article is the pure lambda calculus without extensions, but lambda terms extended with arithmetic operations are used for explanatory purposes.
An abstraction
λ
x
.
t
{\displaystyle \lambda x.t}
denotes an § anonymous function that takes a single input x and returns t. For example,
λ
x
.
(
x
2
+
2
)
{\displaystyle \lambda x.(x^{2}+2)}
is an abstraction representing the function
f
{\displaystyle f}
defined by
f
(
x
)
=
x
2
+
2
,
{\displaystyle f(x)=x^{2}+2,}
using the term
x
2
+
2
{\displaystyle x^{2}+2}
for t. The name
f
{\displaystyle f}
is superfluous when using abstraction. The syntax
(
λ
x
.
t
)
{\displaystyle (\lambda x.t)}
binds the variable x in the term t. The definition of a function with an abstraction merely "sets up" the function but does not invoke it.
An application
t
s
{\displaystyle ts}
represents the application of a function t to an input s, that is, it represents the act of calling function t on input s to produce
t
(
s
)
{\displaystyle t(s)}
.
A lambda term may refer to a variable that has not been bound, such as the term
λ
x
.
(
x
+
y
)
{\displaystyle \lambda x.(x+y)}
(which represents the function definition
f
(
x
)
=
x
+
y
{\displaystyle f(x)=x+y}
). In this term, the variable y has not been defined and is considered an unknown. The abstraction
λ
x
.
(
x
+
y
)
{\displaystyle \lambda x.(x+y)}
is a syntactically valid term and represents a function that adds its input to the yet-unknown y.
Parentheses may be used and might be needed to disambiguate terms. For example,
λ
x
.
(
(
λ
x
.
x
)
x
)
{\displaystyle \lambda x.((\lambda x.x)x)}
is of form
λ
x
.
B
{\displaystyle \lambda x.B}
and is therefore an abstraction, while
(
λ
x
.
(
λ
x
.
x
)
)
x
{\displaystyle (\lambda x.(\lambda x.x))x}
is of form
M
N
{\displaystyle MN}
and is therefore an application.
The examples 1 and 2 denote different terms, differing only in where the parentheses are placed. They have different meanings: example 1 is a function definition, while example 2 is a function application. The lambda variable x is a placeholder in both examples.
Here, example 1 defines a function
λ
x
.
B
{\displaystyle \lambda x.B}
, where
B
{\displaystyle B}
is
(
λ
x
.
x
)
x
{\displaystyle (\lambda x.x)x}
, an anonymous function
(
λ
x
.
x
)
{\displaystyle (\lambda x.x)}
, with input
x
{\displaystyle x}
; while example 2,
M
{\displaystyle M}
N
{\displaystyle N}
, is M applied to N, where
M
{\displaystyle M}
is the lambda term
(
λ
x
.
(
λ
x
.
x
)
)
{\displaystyle (\lambda x.(\lambda x.x))}
being applied to the input
N
{\displaystyle N}
which is
x
{\displaystyle x}
. Both examples 1 and 2 would evaluate to the identity function
λ
x
.
x
{\displaystyle \lambda x.x}
.
==== Functions that operate on functions ====
In lambda calculus, functions are taken to be 'first class values', so functions may be used as the inputs, or be returned as outputs from other functions.
For example, the lambda term
λ
x
.
x
{\displaystyle \lambda x.x}
represents the identity function,
x
↦
x
{\displaystyle x\mapsto x}
. Further,
λ
x
.
y
{\displaystyle \lambda x.y}
represents the constant function
x
↦
y
{\displaystyle x\mapsto y}
, the function that always returns
y
{\displaystyle y}
, no matter the input. As an example of a function operating on functions, the function composition can be defined as
λ
f
.
λ
g
.
λ
x
.
(
f
(
g
x
)
)
{\displaystyle \lambda f.\lambda g.\lambda x.(f(gx))}
.
There are several notions of "equivalence" and "reduction" that allow lambda terms to be "reduced" to "equivalent" lambda terms.
==== Alpha equivalence ====
A basic form of equivalence, definable on lambda terms, is alpha equivalence. It captures the intuition that the particular choice of a bound variable, in an abstraction, does not (usually) matter.
For instance,
λ
x
.
x
{\displaystyle \lambda x.x}
and
λ
y
.
y
{\displaystyle \lambda y.y}
are alpha-equivalent lambda terms, and they both represent the same function (the identity function).
The terms
x
{\displaystyle x}
and
y
{\displaystyle y}
are not alpha-equivalent, because they are not bound in an abstraction.
In many presentations, it is usual to identify alpha-equivalent lambda terms.
The following definitions are necessary in order to be able to define β-reduction:
==== Free variables ====
The free variables of a term are those variables not bound by an abstraction. The set of free variables of an expression is defined inductively:
The free variables of
x
{\displaystyle x}
are just
x
{\displaystyle x}
The set of free variables of
λ
x
.
t
{\displaystyle \lambda x.t}
is the set of free variables of
t
{\displaystyle t}
, but with
x
{\displaystyle x}
removed
The set of free variables of
t
s
{\displaystyle ts}
is the union of the set of free variables of
t
{\displaystyle t}
and the set of free variables of
s
{\displaystyle s}
.
For example, the lambda term representing the identity
λ
x
.
x
{\displaystyle \lambda x.x}
has no free variables, but the function
λ
x
.
y
x
{\displaystyle \lambda x.yx}
has a single free variable,
y
{\displaystyle y}
.
==== Capture-avoiding substitutions ====
Suppose
t
{\displaystyle t}
,
s
{\displaystyle s}
and
r
{\displaystyle r}
are lambda terms, and
x
{\displaystyle x}
and
y
{\displaystyle y}
are variables.
The notation
t
[
x
:=
r
]
{\displaystyle t[x:=r]}
indicates substitution of
r
{\displaystyle r}
for
x
{\displaystyle x}
in
t
{\displaystyle t}
in a capture-avoiding manner. This is defined so that:
x
[
x
:=
r
]
=
r
{\displaystyle x[x:=r]=r}
; with
r
{\displaystyle r}
substituted for
x
{\displaystyle x}
,
x
{\displaystyle x}
becomes
r
{\displaystyle r}
y
[
x
:=
r
]
=
y
{\displaystyle y[x:=r]=y}
if
x
≠
y
{\displaystyle x\neq y}
; with
r
{\displaystyle r}
substituted for
x
{\displaystyle x}
,
y
{\displaystyle y}
(which is not
x
{\displaystyle x}
) remains
y
{\displaystyle y}
(
t
s
)
[
x
:=
r
]
=
(
t
[
x
:=
r
]
)
(
s
[
x
:=
r
]
)
{\displaystyle (ts)[x:=r]=(t[x:=r])(s[x:=r])}
; substitution distributes to both sides of an application
(
λ
x
.
t
)
[
x
:=
r
]
=
λ
x
.
t
{\displaystyle (\lambda x.t)[x:=r]=\lambda x.t}
; a variable bound by an abstraction is not subject to substitution; substituting such variable leaves the abstraction unchanged
(
λ
y
.
t
)
[
x
:=
r
]
=
λ
y
.
(
t
[
x
:=
r
]
)
{\displaystyle (\lambda y.t)[x:=r]=\lambda y.(t[x:=r])}
if
x
≠
y
{\displaystyle x\neq y}
and
y
{\displaystyle y}
does not appear among the free variables of
r
{\displaystyle r}
(
y
{\displaystyle y}
is said to be "fresh" for
r
{\displaystyle r}
) ; substituting a variable which is not bound by an abstraction proceeds in the abstraction's body, provided that the abstracted variable
y
{\displaystyle y}
is "fresh" for the substitution term
r
{\displaystyle r}
.
For example,
(
λ
x
.
x
)
[
y
:=
y
]
=
λ
x
.
(
x
[
y
:=
y
]
)
=
λ
x
.
x
{\displaystyle (\lambda x.x)[y:=y]=\lambda x.(x[y:=y])=\lambda x.x}
, and
(
(
λ
x
.
y
)
x
)
[
x
:=
y
]
=
(
(
λ
x
.
y
)
[
x
:=
y
]
)
(
x
[
x
:=
y
]
)
=
(
λ
x
.
y
)
y
{\displaystyle ((\lambda x.y)x)[x:=y]=((\lambda x.y)[x:=y])(x[x:=y])=(\lambda x.y)y}
.
The freshness condition (requiring that
y
{\displaystyle y}
is not in the free variables of
r
{\displaystyle r}
) is crucial in order to ensure that substitution does not change the meaning of functions.
For example, a substitution that ignores the freshness condition could lead to errors:
(
λ
x
.
y
)
[
y
:=
x
]
=
λ
x
.
(
y
[
y
:=
x
]
)
=
λ
x
.
x
{\displaystyle (\lambda x.y)[y:=x]=\lambda x.(y[y:=x])=\lambda x.x}
. This erroneous substitution would turn the constant function
λ
x
.
y
{\displaystyle \lambda x.y}
into the identity
λ
x
.
x
{\displaystyle \lambda x.x}
.
In general, failure to meet the freshness condition can be remedied by alpha-renaming first, with a suitable fresh variable.
For example, switching back to our correct notion of substitution, in
(
λ
x
.
y
)
[
y
:=
x
]
{\displaystyle (\lambda x.y)[y:=x]}
the abstraction can be renamed with a fresh variable
z
{\displaystyle z}
, to obtain
(
λ
z
.
y
)
[
y
:=
x
]
=
λ
z
.
(
y
[
y
:=
x
]
)
=
λ
z
.
x
{\displaystyle (\lambda z.y)[y:=x]=\lambda z.(y[y:=x])=\lambda z.x}
, and the meaning of the function is preserved by substitution.
==== β-reduction ====
The β-reduction rule states that an application of the form
(
λ
x
.
t
)
s
{\displaystyle (\lambda x.t)s}
reduces to the term
t
[
x
:=
s
]
{\displaystyle t[x:=s]}
. The notation
(
λ
x
.
t
)
s
→
t
[
x
:=
s
]
{\displaystyle (\lambda x.t)s\to t[x:=s]}
is used to indicate that
(
λ
x
.
t
)
s
{\displaystyle (\lambda x.t)s}
β-reduces to
t
[
x
:=
s
]
{\displaystyle t[x:=s]}
.
For example, for every
s
{\displaystyle s}
,
(
λ
x
.
x
)
s
→
x
[
x
:=
s
]
=
s
{\displaystyle (\lambda x.x)s\to x[x:=s]=s}
. This demonstrates that
λ
x
.
x
{\displaystyle \lambda x.x}
really is the identity.
Similarly,
(
λ
x
.
y
)
s
→
y
[
x
:=
s
]
=
y
{\displaystyle (\lambda x.y)s\to y[x:=s]=y}
, which demonstrates that
λ
x
.
y
{\displaystyle \lambda x.y}
is a constant function.
The lambda calculus may be seen as an idealized version of a functional programming language, like Haskell or Standard ML. Under this view, β-reduction corresponds to a computational step. This step can be repeated by additional β-reductions until there are no more applications left to reduce. In the untyped lambda calculus, as presented here, this reduction process may not terminate. For instance, consider the term
Ω
=
(
λ
x
.
x
x
)
(
λ
x
.
x
x
)
{\displaystyle \Omega =(\lambda x.xx)(\lambda x.xx)}
.
Here
(
λ
x
.
x
x
)
(
λ
x
.
x
x
)
→
(
x
x
)
[
x
:=
λ
x
.
x
x
]
=
(
x
[
x
:=
λ
x
.
x
x
]
)
(
x
[
x
:=
λ
x
.
x
x
]
)
=
(
λ
x
.
x
x
)
(
λ
x
.
x
x
)
{\displaystyle (\lambda x.xx)(\lambda x.xx)\to (xx)[x:=\lambda x.xx]=(x[x:=\lambda x.xx])(x[x:=\lambda x.xx])=(\lambda x.xx)(\lambda x.xx)}
.
That is, the term reduces to itself in a single β-reduction, and therefore the reduction process will never terminate.
Another aspect of the untyped lambda calculus is that it does not distinguish between different kinds of data. For instance, it may be desirable to write a function that only operates on numbers. However, in the untyped lambda calculus, there is no way to prevent a function from being applied to truth values, strings, or other non-number objects.
== Formal definition ==
=== Definition ===
Lambda expressions are composed of:
variables v1, v2, ...;
the abstraction symbols λ (lambda) and . (dot);
parentheses ().
The set of lambda expressions, Λ, can be defined inductively:
If x is a variable, then x ∈ Λ.
If x is a variable and M ∈ Λ, then (λx.M) ∈ Λ.
If M, N ∈ Λ, then (M N) ∈ Λ.
Instances of rule 2 are known as abstractions and instances of rule 3 are known as applications. See § reducible expression
This set of rules may be written in Backus–Naur form as:
=== Notation ===
To keep the notation of lambda expressions uncluttered, the following conventions are usually applied:
Outermost parentheses are dropped: M N instead of (M N).
Applications are assumed to be left associative: M N P may be written instead of ((M N) P).
When all variables are single-letter, the space in applications may be omitted: MNP instead of M N P.
The body of an abstraction extends as far right as possible: λx.M N means λx.(M N) and not (λx.M) N.
A sequence of abstractions is contracted: λx.λy.λz.N is abbreviated as λxyz.N.
=== Free and bound variables ===
The abstraction operator, λ, is said to bind its variable wherever it occurs in the body of the abstraction. Variables that fall within the scope of an abstraction are said to be bound. In an expression λx.M, the part λx is often called binder, as a hint that the variable x is getting bound by prepending λx to M. All other variables are called free. For example, in the expression λy.x x y, y is a bound variable and x is a free variable. Also a variable is bound by its nearest abstraction. In the following example the single occurrence of x in the expression is bound by the second lambda: λx.y (λx.z x).
The set of free variables of a lambda expression, M, is denoted as FV(M) and is defined by recursion on the structure of the terms, as follows:
FV(x) = {x}, where x is a variable.
FV(λx.M) = FV(M) \ {x}.
FV(M N) = FV(M) ∪ FV(N).
An expression that contains no free variables is said to be closed. Closed lambda expressions are also known as combinators and are equivalent to terms in combinatory logic.
== Reduction ==
The meaning of lambda expressions is defined by how expressions can be reduced.
There are three kinds of reduction:
α-conversion: changing bound variables;
β-reduction: applying functions to their arguments;
η-conversion: expressing extensionality.
We also speak of the resulting equivalences: two expressions are α-equivalent, if they can be α-converted into the same expression. β-equivalence and η-equivalence are defined similarly.
The term redex, short for reducible expression, refers to subterms that can be reduced by one of the reduction rules. For example, (λx.M) N is a β-redex in expressing the substitution of N for x in M. The expression to which a redex reduces is called its reduct; the reduct of (λx.M) N is M[x := N].
If x is not free in M, λx.M x is also an η-redex, with a reduct of M.
=== α-conversion ===
α-conversion (alpha-conversion), sometimes known as α-renaming, allows bound variable names to be changed. For example, α-conversion of λx.x might yield λy.y. Terms that differ only by α-conversion are called α-equivalent. Frequently, in uses of lambda calculus, α-equivalent terms are considered to be equivalent.
The precise rules for α-conversion are not completely trivial. First, when α-converting an abstraction, the only variable occurrences that are renamed are those that are bound to the same abstraction. For example, an α-conversion of λx.λx.x could result in λy.λx.x, but it could not result in λy.λx.y. The latter has a different meaning from the original. This is analogous to the programming notion of variable shadowing.
Second, α-conversion is not possible if it would result in a variable getting captured by a different abstraction. For example, if we replace x with y in λx.λy.x, we get λy.λy.y, which is not at all the same.
In programming languages with static scope, α-conversion can be used to make name resolution simpler by ensuring that no variable name masks a name in a containing scope (see α-renaming to make name resolution trivial).
In the De Bruijn index notation, any two α-equivalent terms are syntactically identical.
==== Substitution ====
Substitution, written M[x := N], is the process of replacing all free occurrences of the variable x in the expression M with expression N. Substitution on terms of the lambda calculus is defined by recursion on the structure of terms, as follows (note: x and y are only variables while M and N are any lambda expression):
x[x := N] = N
y[x := N] = y, if x ≠ y
(M1 M2)[x := N] = M1[x := N] M2[x := N]
(λx.M)[x := N] = λx.M
(λy.M)[x := N] = λy.(M[x := N]), if x ≠ y and y ∉ FV(N) See above for the FV
To substitute into an abstraction, it is sometimes necessary to α-convert the expression. For example, it is not correct for (λx.y)[y := x] to result in λx.x, because the substituted x was supposed to be free but ended up being bound. The correct substitution in this case is λz.x, up to α-equivalence. Substitution is defined uniquely up to α-equivalence. See Capture-avoiding substitutions above.
=== β-reduction ===
β-reduction (beta reduction) captures the idea of function application. β-reduction is defined in terms of substitution: the β-reduction of (λx.M) N is M[x := N].
For example, assuming some encoding of 2, 7, ×, we have the following β-reduction: (λn.n × 2) 7 → 7 × 2.
β-reduction can be seen to be the same as the concept of local reducibility in natural deduction, via the Curry–Howard isomorphism.
=== η-conversion ===
η-conversion (eta conversion) expresses the idea of extensionality, which in this context is that two functions are the same if and only if they give the same result for all arguments. η-conversion converts between λx.f x and f whenever x does not appear free in f.
η-reduction changes λx.f x to f, and η-expansion changes f to λx.f x, under the same requirement that x does not appear free in f.
η-conversion can be seen to be the same as the concept of local completeness in natural deduction, via the Curry–Howard isomorphism.
== Normal forms and confluence ==
For the untyped lambda calculus, β-reduction as a rewriting rule is neither strongly normalising nor weakly normalising.
However, it can be shown that β-reduction is confluent when working up to α-conversion (i.e. we consider two normal forms to be equal if it is possible to α-convert one into the other).
Therefore, both strongly normalising terms and weakly normalising terms have a unique normal form. For strongly normalising terms, any reduction strategy is guaranteed to yield the normal form, whereas for weakly normalising terms, some reduction strategies may fail to find it.
== Encoding datatypes ==
The basic lambda calculus may be used to model arithmetic, Booleans, data structures, and recursion, as illustrated in the following sub-sections i, ii, iii, and § iv.
=== Arithmetic in lambda calculus ===
There are several possible ways to define the natural numbers in lambda calculus, but by far the most common are the Church numerals, which can be defined as follows:
0 := λf.λx.x
1 := λf.λx.f x
2 := λf.λx.f (f x)
3 := λf.λx.f (f (f x))
and so on. Or using the alternative syntax presented above in Notation:
0 := λfx.x
1 := λfx.f x
2 := λfx.f (f x)
3 := λfx.f (f (f x))
A Church numeral is a higher-order function—it takes a single-argument function f, and returns another single-argument function. The Church numeral n is a function that takes a function f as argument and returns the n-th composition of f, i.e. the function f composed with itself n times. This is denoted f(n) and is in fact the n-th power of f (considered as an operator); f(0) is defined to be the identity function. Such repeated compositions (of a single function f) obey the laws of exponents, which is why these numerals can be used for arithmetic. (In Church's original lambda calculus, the formal parameter of a lambda expression was required to occur at least once in the function body, which made the above definition of 0 impossible.)
One way of thinking about the Church numeral n, which is often useful when analysing programs, is as an instruction 'repeat n times'. For example, using the PAIR and NIL functions defined below, one can define a function that constructs a (linked) list of n elements all equal to x by repeating 'prepend another x element' n times, starting from an empty list. The lambda term is
λn.λx.n (PAIR x) NIL
By varying what is being repeated, and varying what argument that function being repeated is applied to, a great many different effects can be achieved.
We can define a successor function, which takes a Church numeral n and returns n + 1 by adding another application of f, where '(mf)x' means the function 'f' is applied 'm' times on 'x':
SUCC := λn.λf.λx.f (n f x)
Because the m-th composition of f composed with the n-th composition of f gives the m+n-th composition of f, addition can be defined as follows:
PLUS := λm.λn.λf.λx.m f (n f x)
PLUS can be thought of as a function taking two natural numbers as arguments and returning a natural number; it can be verified that
PLUS 2 3
and
5
are β-equivalent lambda expressions. Since adding m to a number n can be accomplished by adding 1 m times, an alternative definition is:
PLUS := λm.λn.m SUCC n
Similarly, multiplication can be defined as
MULT := λm.λn.λf.m (n f)
Alternatively
MULT := λm.λn.m (PLUS n) 0
since multiplying m and n is the same as repeating the add n function m times and then applying it to zero.
Exponentiation has a rather simple rendering in Church numerals, namely
POW := λb.λe.e b
The predecessor function defined by PRED n = n − 1 for a positive integer n and PRED 0 = 0 is considerably more difficult. The formula
PRED := λn.λf.λx.n (λg.λh.h (g f)) (λu.x) (λu.u)
can be validated by showing inductively that if T denotes (λg.λh.h (g f)), then T(n)(λu.x) = (λh.h(f(n−1)(x))) for n > 0. Two other definitions of PRED are given below, one using conditionals and the other using pairs. With the predecessor function, subtraction is straightforward. Defining
SUB := λm.λn.n PRED m,
SUB m n yields m − n when m > n and 0 otherwise.
=== Logic and predicates ===
By convention, the following two definitions (known as Church Booleans) are used for the Boolean values TRUE and FALSE:
TRUE := λx.λy.x
FALSE := λx.λy.y
Then, with these two lambda terms, we can define some logic operators (these are just possible formulations; other expressions could be equally correct):
AND := λp.λq.p q p
OR := λp.λq.p p q
NOT := λp.p FALSE TRUE
IFTHENELSE := λp.λa.λb.p a b
We are now able to compute some logic functions, for example:
AND TRUE FALSE
≡ (λp.λq.p q p) TRUE FALSE →β TRUE FALSE TRUE
≡ (λx.λy.x) FALSE TRUE →β FALSE
and we see that AND TRUE FALSE is equivalent to FALSE.
A predicate is a function that returns a Boolean value. The most fundamental predicate is ISZERO, which returns TRUE if its argument is the Church numeral 0, but FALSE if its argument were any other Church numeral:
ISZERO := λn.n (λx.FALSE) TRUE
The following predicate tests whether the first argument is less-than-or-equal-to the second:
LEQ := λm.λn.ISZERO (SUB m n),
and since m = n, if LEQ m n and LEQ n m, it is straightforward to build a predicate for numerical equality.
The availability of predicates and the above definition of TRUE and FALSE make it convenient to write "if-then-else" expressions in lambda calculus. For example, the predecessor function can be defined as:
PRED := λn.n (λg.λk.ISZERO (g 1) k (PLUS (g k) 1)) (λv.0) 0
which can be verified by showing inductively that n (λg.λk.ISZERO (g 1) k (PLUS (g k) 1)) (λv.0) is the add n − 1 function for n > 0.
=== Pairs ===
A pair (2-tuple) can be defined in terms of TRUE and FALSE, by using the Church encoding for pairs. For example, PAIR encapsulates the pair (x,y), FIRST returns the first element of the pair, and SECOND returns the second.
PAIR := λx.λy.λf.f x y
FIRST := λp.p TRUE
SECOND := λp.p FALSE
NIL := λx.TRUE
NULL := λp.p (λx.λy.FALSE)
A linked list can be defined as either NIL for the empty list, or the PAIR of an element and a smaller list. The predicate NULL tests for the value NIL. (Alternatively, with NIL := FALSE, the construct l (λh.λt.λz.deal_with_head_h_and_tail_t) (deal_with_nil) obviates the need for an explicit NULL test).
As an example of the use of pairs, the shift-and-increment function that maps (m, n) to (n, n + 1) can be defined as
Φ := λx.PAIR (SECOND x) (SUCC (SECOND x))
which allows us to give perhaps the most transparent version of the predecessor function:
PRED := λn.FIRST (n Φ (PAIR 0 0)).
== Additional programming techniques ==
There is a considerable body of programming idioms for lambda calculus. Many of these were originally developed in the context of using lambda calculus as a foundation for programming language semantics, effectively using lambda calculus as a low-level programming language. Because several programming languages include the lambda calculus (or something very similar) as a fragment, these techniques also see use in practical programming, but may then be perceived as obscure or foreign.
=== Named constants ===
In lambda calculus, a library would take the form of a collection of previously defined functions, which as lambda-terms are merely particular constants. The pure lambda calculus does not have a concept of named constants since all atomic lambda-terms are variables, but one can emulate having named constants by setting aside a variable as the name of the constant, using abstraction to bind that variable in the main body, and apply that abstraction to the intended definition. Thus to use f to mean N (some explicit lambda-term) in M (another lambda-term, the "main program"), one can say
(λf.M) N
Authors often introduce syntactic sugar, such as let, to permit writing the above in the more intuitive order
let f = N in M
By chaining such definitions, one can write a lambda calculus "program" as zero or more function definitions, followed by one lambda-term using those functions that constitutes the main body of the program.
A notable restriction of this let is that the name f may not be referenced in N, for N is outside the scope of the abstraction binding f, which is M; this means a recursive function definition cannot be written with let. The letrec construction would allow writing recursive function definitions, where the scope of the abstraction binding f includes N as well as M. Or self-application a-la that which leads to Y combinator could be used.
=== Recursion and fixed points ===
Recursion is when a function invokes itself. What would a value be which were to represent such a function? It has to refer to itself somehow inside itself, just as the definition refers to itself inside itself. If this value were to contain itself by value, it would have to be of infinite size, which is impossible. Other notations, which support recursion natively, overcome this by referring to the function by name inside its definition. Lambda calculus cannot express this, since in it there simply are no names for terms to begin with, only arguments' names, i.e. parameters in abstractions. Thus, a lambda expression can receive itself as its argument and refer to (a copy of) itself via the corresponding parameter's name. This will work fine in case it was indeed called with itself as an argument. For example, (λx.x x) E = (E E) will express recursion when E is an abstraction which is applying its parameter to itself inside its body to express a recursive call. Since this parameter receives E as its value, its self-application will be the same (E E) again.
As a concrete example, consider the factorial function F(n), recursively defined by
F(n) = 1, if n = 0; else n × F(n − 1).
In the lambda expression which is to represent this function, a parameter (typically the first one) will be assumed to receive the lambda expression itself as its value, so that calling it with itself as its first argument will amount to the recursive call. Thus to achieve recursion, the intended-as-self-referencing argument (called s here, reminiscent of "self", or "self-applying") must always be passed to itself within the function body at a recursive call point:
E := λs. λn.(1, if n = 0; else n × (s s (n−1)))
with s s n = F n = E E n to hold, so s = E and
F := (λx.x x) E = E E
and we have
F = E E = λn.(1, if n = 0; else n × (E E (n−1)))
Here s s becomes the same (E E) inside the result of the application (E E), and using the same function for a call is the definition of what recursion is. The self-application achieves replication here, passing the function's lambda expression on to the next invocation as an argument value, making it available to be referenced there by the parameter name s to be called via the self-application s s, again and again as needed, each time re-creating the lambda-term F = E E.
The application is an additional step just as the name lookup would be. It has the same delaying effect. Instead of having F inside itself as a whole up-front, delaying its re-creation until the next call makes its existence possible by having two finite lambda-terms E inside it re-create it on the fly later as needed.
This self-applicational approach solves it, but requires re-writing each recursive call as a self-application. We would like to have a generic solution, without the need for any re-writes:
G := λr. λn.(1, if n = 0; else n × (r (n−1)))
with r x = F x = G r x to hold, so r = G r =: FIX G and
F := FIX G where FIX g = (r where r = g r) = g (FIX g)
so that FIX G = G (FIX G) = (λn.(1, if n = 0; else n × ((FIX G) (n−1))))
Given a lambda term with first argument representing recursive call (e.g. G here), the fixed-point combinator FIX will return a self-replicating lambda expression representing the recursive function (here, F). The function does not need to be explicitly passed to itself at any point, for the self-replication is arranged in advance, when it is created, to be done each time it is called. Thus the original lambda expression (FIX G) is re-created inside itself, at call-point, achieving self-reference.
In fact, there are many possible definitions for this FIX operator, the simplest of them being:
Y := λg.(λx.g (x x)) (λx.g (x x))
In the lambda calculus, Y g is a fixed-point of g, as it expands to:
Y g
~> (λh.(λx.h (x x)) (λx.h (x x))) g
~> (λx.g (x x)) (λx.g (x x))
~> g ((λx.g (x x)) (λx.g (x x)))
<~ g (Y g)
Now, to perform the recursive call to the factorial function for an argument n, we would simply call (Y G) n. Given n = 4, for example, this gives:
Every recursively defined function can be seen as a fixed point of some suitably defined higher order function (also known as functional) closing over the recursive call with an extra argument. Therefore, using Y, every recursive function can be expressed as a lambda expression. In particular, we can now cleanly define the subtraction, multiplication, and comparison predicates of natural numbers, using recursion.
When Y combinator is coded directly in a strict programming language, the applicative order of evaluation used in such languages will cause an attempt to fully expand the internal self-application
(
x
x
)
{\displaystyle (xx)}
prematurely, causing stack overflow or, in case of tail call optimization, indefinite looping. A delayed variant of Y, the Z combinator, can be used in such languages. It has the internal self-application hidden behind an extra abstraction through eta-expansion, as
(
λ
v
.
x
x
v
)
{\displaystyle (\lambda v.xxv)}
, thus preventing its premature expansion:
Z
=
λ
f
.
(
λ
x
.
f
(
λ
v
.
x
x
v
)
)
(
λ
x
.
f
(
λ
v
.
x
x
v
)
)
.
{\displaystyle Z=\lambda f.(\lambda x.f(\lambda v.xxv))\ (\lambda x.f(\lambda v.xxv))\ .}
=== Standard terms ===
Certain terms have commonly accepted names:
I := λx.x
S := λx.λy.λz.x z (y z)
K := λx.λy.x
B := λx.λy.λz.x (y z)
C := λx.λy.λz.x z y
W := λx.λy.x y y
ω or Δ or U := λx.x x
Ω := ω ω
I is the identity function. SK and BCKW form complete combinator calculus systems that can express any lambda term - see
the next section. Ω is UU, the smallest term that has no normal form. YI is another such term.
Y is standard and defined above, and can also be defined as Y=BU(CBU), so that Yg=g(Yg). TRUE and FALSE defined above are commonly abbreviated as T and F.
=== Abstraction elimination ===
If N is a lambda-term without abstraction, but possibly containing named constants (combinators), then there exists a lambda-term T(x,N) which is equivalent to λx.N but lacks abstraction (except as part of the named constants, if these are considered non-atomic). This can also be viewed as anonymising variables, as T(x,N) removes all occurrences of x from N, while still allowing argument values to be substituted into the positions where N contains an x. The conversion function T can be defined by:
T(x, x) := I
T(x, N) := K N if x is not free in N.
T(x, M N) := S T(x, M) T(x, N)
In either case, a term of the form T(x,N) P can reduce by having the initial combinator I, K, or S grab the argument P, just like β-reduction of (λx.N) P would do. I returns that argument. K throws the argument away, just like (λx.N) would do if x has no free occurrence in N. S passes the argument on to both subterms of the application, and then applies the result of the first to the result of the second.
The combinators B and C are similar to S, but pass the argument on to only one subterm of an application (B to the "argument" subterm and C to the "function" subterm), thus saving a subsequent K if there is no occurrence of x in one subterm. In comparison to B and C, the S combinator actually conflates two functionalities: rearranging arguments, and duplicating an argument so that it may be used in two places. The W combinator does only the latter, yielding the B, C, K, W system as an alternative to SKI combinator calculus.
== Typed lambda calculus ==
A typed lambda calculus is a typed formalism that uses the lambda-symbol (
λ
{\displaystyle \lambda }
) to denote anonymous function abstraction. In this context, types are usually objects of a syntactic nature that are assigned to lambda terms; the exact nature of a type depends on the calculus considered (see Kinds of typed lambda calculi). From a certain point of view, typed lambda calculi can be seen as refinements of the untyped lambda calculus but from another point of view, they can also be considered the more fundamental theory and untyped lambda calculus a special case with only one type.
Typed lambda calculi are foundational programming languages and are the base of typed functional programming languages such as ML and Haskell and, more indirectly, typed imperative programming languages. Typed lambda calculi play an important role in the design of type systems for programming languages; here typability usually captures desirable properties of the program, e.g., the program will not cause a memory access violation.
Typed lambda calculi are closely related to mathematical logic and proof theory via the Curry–Howard isomorphism and they can be considered as the internal language of classes of categories, e.g., the simply typed lambda calculus is the language of a Cartesian closed category (CCC).
== Reduction strategies ==
Whether a term is normalising or not, and how much work needs to be done in normalising it if it is, depends to a large extent on the reduction strategy used. Common lambda calculus reduction strategies include:
Normal order
The leftmost outermost redex is reduced first. That is, whenever possible, arguments are substituted into the body of an abstraction before the arguments are reduced. If a term has a beta-normal form, normal order reduction will always reach that normal form.
Applicative order
The leftmost innermost redex is reduced first. As a consequence, a function's arguments are always reduced before they are substituted into the function. Unlike normal order reduction, applicative order reduction may fail to find the beta-normal form of an expression, even if such a normal form exists. For example, the term
(
λ
x
.
y
(
λ
z
.
(
z
z
)
λ
z
.
(
z
z
)
)
)
{\displaystyle (\;\lambda x.y\;\;(\lambda z.(zz)\;\lambda z.(zz))\;)}
is reduced to itself by applicative order, while normal order reduces it to its beta-normal form
y
{\displaystyle y}
.
Full β-reductions
Any redex can be reduced at any time. This means essentially the lack of any particular reduction strategy—with regard to reducibility, "all bets are off".
Weak reduction strategies do not reduce under lambda abstractions:
Call by value
Like applicative order, but no reductions are performed inside abstractions. This is similar to the evaluation order of strict languages like C: the arguments to a function are evaluated before calling the function, and function bodies are not even partially evaluated until the arguments are substituted in.
Call by name
Like normal order, but no reductions are performed inside abstractions. For example, λx.(λy.y)x is in normal form according to this strategy, although it contains the redex (λy.y)x.
Strategies with sharing reduce computations that are "the same" in parallel:
Optimal reduction
As normal order, but computations that have the same label are reduced simultaneously.
Call by need
As call by name (hence weak), but function applications that would duplicate terms instead name the argument. The argument may be evaluated "when needed", at which point the name binding is updated with the reduced value. This can save time compared to normal order evaluation.
== Computability ==
There is no algorithm that takes as input any two lambda expressions and outputs TRUE or FALSE depending on whether one expression reduces to the other. More precisely, no computable function can decide the question. This was historically the first problem for which undecidability could be proven. As usual for such a proof, computable means computable by any model of computation that is Turing complete. In fact computability can itself be defined via the lambda calculus: a function F: N → N of natural numbers is a computable function if and only if there exists a lambda expression f such that for every pair of x, y in N, F(x)=y if and only if f x =β y, where x and y are the Church numerals corresponding to x and y, respectively and =β meaning equivalence with β-reduction. See the Church–Turing thesis for other approaches to defining computability and their equivalence.
Church's proof of uncomputability first reduces the problem to determining whether a given lambda expression has a normal form. Then he assumes that this predicate is computable, and can hence be expressed in lambda calculus. Building on earlier work by Kleene and constructing a Gödel numbering for lambda expressions, he constructs a lambda expression e that closely follows the proof of Gödel's first incompleteness theorem. If e is applied to its own Gödel number, a contradiction results.
== Complexity ==
The notion of computational complexity for the lambda calculus is a bit tricky, because the cost of a β-reduction may vary depending on how it is implemented.
To be precise, one must somehow find the location of all of the occurrences of the bound variable V in the expression E, implying a time cost, or one must keep track of the locations of free variables in some way, implying a space cost. A naïve search for the locations of V in E is O(n) in the length n of E. Director strings were an early approach that traded this time cost for a quadratic space usage. More generally this has led to the study of systems that use explicit substitution.
In 2014, it was shown that the number of β-reduction steps taken by normal order reduction to reduce a term is a reasonable time cost model, that is, the reduction can be simulated on a Turing machine in time polynomially proportional to the number of steps. This was a long-standing open problem, due to size explosion, the existence of lambda terms which grow exponentially in size for each β-reduction. The result gets around this by working with a compact shared representation. The result makes clear that the amount of space needed to evaluate a lambda term is not proportional to the size of the term during reduction. It is not currently known what a good measure of space complexity would be.
An unreasonable model does not necessarily mean inefficient. Optimal reduction reduces all computations with the same label in one step, avoiding duplicated work, but the number of parallel β-reduction steps to reduce a given term to normal form is approximately linear in the size of the term. This is far too small to be a reasonable cost measure, as any Turing machine may be encoded in the lambda calculus in size linearly proportional to the size of the Turing machine. The true cost of reducing lambda terms is not due to β-reduction per se but rather the handling of the duplication of redexes during β-reduction. It is not known if optimal reduction implementations are reasonable when measured with respect to a reasonable cost model such as the number of leftmost-outermost steps to normal form, but it has been shown for fragments of the lambda calculus that the optimal reduction algorithm is efficient and has at most a quadratic overhead compared to leftmost-outermost. In addition the BOHM prototype implementation of optimal reduction outperformed both Caml Light and Haskell on pure lambda terms.
== Lambda calculus and programming languages ==
As pointed out by Peter Landin's 1965 paper "A Correspondence between ALGOL 60 and Church's Lambda-notation", sequential procedural programming languages can be understood in terms of the lambda calculus, which provides the basic mechanisms for procedural abstraction and procedure (subprogram) application.
=== Anonymous functions ===
For example, in Python the "square" function can be expressed as a lambda expression as follows:
The above example is an expression that evaluates to a first-class function. The symbol lambda creates an anonymous function, given a list of parameter names, x – just a single argument in this case, and an expression that is evaluated as the body of the function, x**2. Anonymous functions are sometimes called lambda expressions.
For example, Pascal and many other imperative languages have long supported passing subprograms as arguments to other subprograms through the mechanism of function pointers. However, function pointers are an insufficient condition for functions to be first class datatypes, because a function is a first class datatype if and only if new instances of the function can be created at runtime. Such runtime creation of functions is supported in Smalltalk, JavaScript, Wolfram Language, and more recently in Scala, Eiffel (as agents), C# (as delegates) and C++11, among others.
=== Parallelism and concurrency ===
The Church–Rosser property of the lambda calculus means that evaluation (β-reduction) can be carried out in any order, even in parallel. This means that various nondeterministic evaluation strategies are relevant. However, the lambda calculus does not offer any explicit constructs for parallelism. One can add constructs such as futures to the lambda calculus. Other process calculi have been developed for describing communication and concurrency.
== Semantics ==
The fact that lambda calculus terms act as functions on other lambda calculus terms, and even on themselves, led to questions about the semantics of the lambda calculus. Could a sensible meaning be assigned to lambda calculus terms? The natural semantics was to find a set D isomorphic to the function space D → D, of functions on itself. However, no nontrivial such D can exist, by cardinality constraints because the set of all functions from D to D has greater cardinality than D, unless D is a singleton set.
In the 1970s, Dana Scott showed that if only continuous functions were considered, a set or domain D with the required property could be found, thus providing a model for the lambda calculus.
This work also formed the basis for the denotational semantics of programming languages.
== Variations and extensions ==
These extensions are in the lambda cube:
Typed lambda calculus – Lambda calculus with typed variables (and functions)
System F – A typed lambda calculus with type-variables
Calculus of constructions – A typed lambda calculus with types as first-class values
These formal systems are extensions of lambda calculus that are not in the lambda cube:
Binary lambda calculus – A version of lambda calculus with binary input/output (I/O), a binary encoding of terms, and a designated universal machine.
Lambda-mu calculus – An extension of the lambda calculus for treating classical logic
These formal systems are variations of lambda calculus:
Kappa calculus – A first-order analogue of lambda calculus
These formal systems are related to lambda calculus:
Combinatory logic – A notation for mathematical logic without variables
SKI combinator calculus – A computational system based on the S, K and I combinators, equivalent to lambda calculus, but reducible without variable substitutions
== See also ==
== Further reading ==
Abelson, Harold & Gerald Jay Sussman. Structure and Interpretation of Computer Programs. The MIT Press. ISBN 0-262-51087-1.
Barendregt, Hendrik Pieter Introduction to Lambda Calculus.
Barendregt, Hendrik Pieter, The Impact of the Lambda Calculus in Logic and Computer Science. The Bulletin of Symbolic Logic, Volume 3, Number 2, June 1997.
Barendregt, Hendrik Pieter, The Type Free Lambda Calculus pp1091–1132 of Handbook of Mathematical Logic, North-Holland (1977) ISBN 0-7204-2285-X
Cardone, Felice and Hindley, J. Roger, 2006. History of Lambda-calculus and Combinatory Logic Archived 2021-05-06 at the Wayback Machine. In Gabbay and Woods (eds.), Handbook of the History of Logic, vol. 5. Elsevier.
Church, Alonzo, An unsolvable problem of elementary number theory, American Journal of Mathematics, 58 (1936), pp. 345–363. This paper contains the proof that the equivalence of lambda expressions is in general not decidable.
Church, Alonzo (1941). The Calculi of Lambda-Conversion. Princeton: Princeton University Press. Retrieved 2020-04-14. (ISBN 978-0-691-08394-0)
Frink Jr., Orrin (1944). "Review: The Calculi of Lambda-Conversion by Alonzo Church" (PDF). Bulletin of the American Mathematical Society. 50 (3): 169–172. doi:10.1090/s0002-9904-1944-08090-7.
Kleene, Stephen, A theory of positive integers in formal logic, American Journal of Mathematics, 57 (1935), pp. 153–173 and 219–244. Contains the lambda calculus definitions of several familiar functions.
Landin, Peter, A Correspondence Between ALGOL 60 and Church's Lambda-Notation, Communications of the ACM, vol. 8, no. 2 (1965), pages 89–101. Available from the ACM site. A classic paper highlighting the importance of lambda calculus as a basis for programming languages.
Larson, Jim, An Introduction to Lambda Calculus and Scheme. A gentle introduction for programmers.
Michaelson, Greg (10 April 2013). An Introduction to Functional Programming Through Lambda Calculus. Courier Corporation. ISBN 978-0-486-28029-5.
Schalk, A. and Simmons, H. (2005) An introduction to λ-calculi and arithmetic with a decent selection of exercises. Notes for a course in the Mathematical Logic MSc at Manchester University.
de Queiroz, Ruy J.G.B. (2008). "On Reduction Rules, Meaning-as-Use and Proof-Theoretic Semantics". Studia Logica. 90 (2): 211–247. doi:10.1007/s11225-008-9150-5. S2CID 11321602. A paper giving a formal underpinning to the idea of 'meaning-is-use' which, even if based on proofs, it is different from proof-theoretic semantics as in the Dummett–Prawitz tradition since it takes reduction as the rules giving meaning.
Hankin, Chris, An Introduction to Lambda Calculi for Computer Scientists, ISBN 0954300653
Monographs/textbooks for graduate students
Sørensen, Morten Heine and Urzyczyn, Paweł (2006), Lectures on the Curry–Howard isomorphism, Elsevier, ISBN 0-444-52077-5 is a recent monograph that covers the main topics of lambda calculus from the type-free variety, to most typed lambda calculi, including more recent developments like pure type systems and the lambda cube. It does not cover subtyping extensions.
Pierce, Benjamin (2002), Types and Programming Languages, MIT Press, ISBN 0-262-16209-1 covers lambda calculi from a practical type system perspective; some topics like dependent types are only mentioned, but subtyping is an important topic.
Documents
A Short Introduction to the Lambda Calculus-(PDF) by Achim Jung
A timeline of lambda calculus-(PDF) by Dana Scott
A Tutorial Introduction to the Lambda Calculus-(PDF) by Raúl Rojas
Lecture Notes on the Lambda Calculus-(PDF) by Peter Selinger
Graphic lambda calculus by Marius Buliga
Lambda Calculus as a Workflow Model by Peter Kelly, Paul Coddington, and Andrew Wendelborn; mentions graph reduction as a common means of evaluating lambda expressions and discusses the applicability of lambda calculus for distributed computing (due to the Church–Rosser property, which enables parallel graph reduction for lambda expressions).
== Notes ==
== References ==
Some parts of this article are based on material from FOLDOC, used with permission.
== External links ==
Graham Hutton, Lambda Calculus, a short (12 minutes) Computerphile video on the Lambda Calculus
Helmut Brandl, Step by Step Introduction to Lambda Calculus
"Lambda-calculus", Encyclopedia of Mathematics, EMS Press, 2001 [1994]
David C. Keenan, To Dissect a Mockingbird: A Graphical Notation for the Lambda Calculus with Animated Reduction
L. Allison, Some executable λ-calculus examples
Georg P. Loczewski, The Lambda Calculus and A++
Bret Victor, Alligator Eggs: A Puzzle Game Based on Lambda Calculus
Lambda Calculus Archived 2012-10-14 at the Wayback Machine on Safalra's Website Archived 2021-05-02 at the Wayback Machine
LCI Lambda Interpreter a simple yet powerful pure calculus interpreter
Lambda Calculus links on Lambda-the-Ultimate
Mike Thyer, Lambda Animator, a graphical Java applet demonstrating alternative reduction strategies.
Implementing the Lambda calculus using C++ Templates
Shane Steinert-Threlkeld, "Lambda Calculi", Internet Encyclopedia of Philosophy
Anton Salikhmetov, Macro Lambda Calculus | Wikipedia/Untyped_lambda_calculus |
In programming languages, a closure, also lexical closure or function closure, is a technique for implementing lexically scoped name binding in a language with first-class functions. Operationally, a closure is a record storing a function together with an environment. The environment is a mapping associating each free variable of the function (variables that are used locally, but defined in an enclosing scope) with the value or reference to which the name was bound when the closure was created. Unlike a plain function, a closure allows the function to access those captured variables through the closure's copies of their values or references, even when the function is invoked outside their scope.
== History and etymology ==
The concept of closures was developed in the 1960s for the mechanical evaluation of expressions in the λ-calculus and was first fully implemented in 1970 as a language feature in the PAL programming language to support lexically scoped first-class functions.
Peter Landin defined the term closure in 1964 as having an environment part and a control part as used by his SECD machine for evaluating expressions. Joel Moses credits Landin with introducing the term closure to refer to a lambda expression with open bindings (free variables) that have been closed by (or bound in) the lexical environment, resulting in a closed expression, or closure. This use was subsequently adopted by Sussman and Steele when they defined Scheme in 1975, a lexically scoped variant of Lisp, and became widespread.
Sussman and Abelson also use the term closure in the 1980s with a second, unrelated meaning: the property of an operator that adds data to a data structure to also be able to add nested data structures. This use of the term comes from mathematics use, rather than the prior use in computer science. The authors consider this overlap in terminology to be "unfortunate."
== Anonymous functions ==
The term closure is often used as a synonym for anonymous function, though strictly, an anonymous function is a function literal without a name, while a closure is an instance of a function, a value, whose non-local variables have been bound either to values or to storage locations (depending on the language; see the lexical environment section below).
For example, in the following Python code:
the values of a and b are closures, in both cases produced by returning a nested function with a free variable from the enclosing function, so that the free variable binds to the value of parameter x of the enclosing function. The closures in a and b are functionally identical. The only difference in implementation is that in the first case we used a nested function with a name, g, while in the second case we used an anonymous nested function (using the Python keyword lambda for creating an anonymous function). The original name, if any, used in defining them is irrelevant.
A closure is a value like any other value. It does not need to be assigned to a variable and can instead be used directly, as shown in the last two lines of the example. This usage may be deemed an "anonymous closure".
The nested function definitions are not themselves closures: they have a free variable which is not yet bound. Only once the enclosing function is evaluated with a value for the parameter is the free variable of the nested function bound, creating a closure, which is then returned from the enclosing function.
Lastly, a closure is only distinct from a function with free variables when outside of the scope of the non-local variables, otherwise the defining environment and the execution environment coincide and there is nothing to distinguish these (static and dynamic binding cannot be distinguished because the names resolve to the same values). For example, in the program below, functions with a free variable x (bound to the non-local variable x with global scope) are executed in the same environment where x is defined, so it is immaterial whether these are actually closures:
This is most often achieved by a function return, since the function must be defined within the scope of the non-local variables, in which case typically its own scope will be smaller.
This can also be achieved by variable shadowing (which reduces the scope of the non-local variable), though this is less common in practice, as it is less useful and shadowing is discouraged. In this example f can be seen to be a closure because x in the body of f is bound to the x in the global namespace, not the x local to g:
== Applications ==
The use of closures is associated with languages where functions are first-class objects, in which functions can be returned as results from higher-order functions, or passed as arguments to other function calls; if functions with free variables are first-class, then returning one creates a closure. This includes functional programming languages such as Lisp and ML, and many modern, multi-paradigm languages, such as Julia, Python, and Rust. Closures are also often used with callbacks, particularly for event handlers, such as in JavaScript, where they are used for interactions with a dynamic web page.
Closures can also be used in a continuation-passing style to hide state. Constructs such as objects and control structures can thus be implemented with closures. In some languages, a closure may occur when a function is defined within another function, and the inner function refers to local variables of the outer function. At run-time, when the outer function executes, a closure is formed, consisting of the inner function's code and references (the upvalues) to any variables of the outer function required by the closure.
=== First-class functions ===
Closures typically appear in languages with first-class functions—in other words, such languages enable functions to be passed as arguments, returned from function calls, bound to variable names, etc., just like simpler types such as strings and integers. For example, consider the following Scheme function:
In this example, the lambda expression (lambda (book) (>= (book-sales book) threshold)) appears within the function best-selling-books. When the lambda expression is evaluated, Scheme creates a closure consisting of the code for the lambda expression and a reference to the threshold variable, which is a free variable inside the lambda expression.
The closure is then passed to the filter function, which calls it repeatedly to determine which books are to be added to the result list and which are to be discarded. Because the closure has a reference to threshold, it can use that variable each time filter calls it. The function filter might be defined in a separate file.
Here is the same example rewritten in JavaScript, another popular language with support for closures:
The arrow operator => is used to define an arrow function expression, and an Array.filter method instead of a global filter function, but otherwise the structure and the effect of the code are the same.
A function may create a closure and return it, as in this example:
Because the closure in this case outlives the execution of the function that creates it, the variables f and dx live on after the function derivative returns, even though execution has left their scope and they are no longer visible. In languages without closures, the lifetime of an automatic local variable coincides with the execution of the stack frame where that variable is declared. In languages with closures, variables must continue to exist as long as any existing closures have references to them. This is most commonly implemented using some form of garbage collection.
=== State representation ===
A closure can be used to associate a function with a set of "private" variables, which persist over several invocations of the function. The scope of the variable encompasses only the closed-over function, so it cannot be accessed from other program code. These are analogous to private variables in object-oriented programming, and in fact closures are similar to stateful function objects (or functors) with a single call-operator method.
In stateful languages, closures can thus be used to implement paradigms for state representation and information hiding, since the closure's upvalues (its closed-over variables) are of indefinite extent, so a value established in one invocation remains available in the next. Closures used in this way no longer have referential transparency, and are thus no longer pure functions; nevertheless, they are commonly used in impure functional languages such as Scheme.
=== Other uses ===
Closures have many uses:
Because closures delay evaluation—i.e., they do not "do" anything until they are called—they can be used to define control structures. For example, all of Smalltalk's standard control structures, including branches (if/then/else) and loops (while and for), are defined using objects whose methods accept closures. Users can easily define their own control structures also.
In languages which implement assignment, multiple functions can be produced that close over the same environment, enabling them to communicate privately by altering that environment. In Scheme:
Closures can be used to implement object systems.
Note: Some speakers call any data structure that binds a lexical environment a closure, but the term usually refers specifically to functions.
== Implementation and theory ==
Closures are typically implemented with a special data structure that contains a pointer to the function code, plus a representation of the function's lexical environment (i.e., the set of available variables) at the time when the closure was created. The referencing environment binds the non-local names to the corresponding variables in the lexical environment at the time the closure is created, additionally extending their lifetime to at least as long as the lifetime of the closure. When the closure is entered at a later time, possibly with a different lexical environment, the function is executed with its non-local variables referring to the ones captured by the closure, not the current environment.
A language implementation cannot easily support full closures if its run-time memory model allocates all automatic variables on a linear stack. In such languages, a function's automatic local variables are deallocated when the function returns. However, a closure requires that the free variables it references survive the enclosing function's execution. Therefore, those variables must be allocated so that they persist until no longer needed, typically via heap allocation, rather than on the stack, and their lifetime must be managed so they survive until all closures referencing them are no longer in use.
This explains why, typically, languages that natively support closures also use garbage collection. The alternatives are manual memory management of non-local variables (explicitly allocating on the heap and freeing when done), or, if using stack allocation, for the language to accept that certain use cases will lead to undefined behaviour, due to dangling pointers to freed automatic variables, as in lambda expressions in C++11 or nested functions in GNU C. The funarg problem (or "functional argument" problem) describes the difficulty of implementing functions as first class objects in a stack-based programming language such as C or C++. Similarly in D version 1, it is assumed that the programmer knows what to do with delegates and automatic local variables, as their references will be invalid after return from its definition scope (automatic local variables are on the stack) – this still permits many useful functional patterns, but for complex cases needs explicit heap allocation for variables. D version 2 solved this by detecting which variables must be stored on the heap, and performs automatic allocation. Because D uses garbage collection, in both versions, there is no need to track usage of variables as they are passed.
In strict functional languages with immutable data (e.g. Erlang), it is very easy to implement automatic memory management (garbage collection), as there are no possible cycles in variables' references. For example, in Erlang, all arguments and variables are allocated on the heap, but references to them are additionally stored on the stack. After a function returns, references are still valid. Heap cleaning is done by incremental garbage collector.
In ML, local variables are lexically scoped, and hence define a stack-like model, but since they are bound to values and not to objects, an implementation is free to copy these values into the closure's data structure in a way that is invisible to the programmer.
Scheme, which has an ALGOL-like lexical scope system with dynamic variables and garbage collection, lacks a stack programming model and does not suffer from the limitations of stack-based languages. Closures are expressed naturally in Scheme. The lambda form encloses the code, and the free variables of its environment persist within the program as long as they can possibly be accessed, and so they can be used as freely as any other Scheme expression.
Closures are closely related to Actors in the Actor model of concurrent computation where the values in the function's lexical environment are called acquaintances. An important issue for closures in concurrent programming languages is whether the variables in a closure can be updated and, if so, how these updates can be synchronized. Actors provide one solution.
Closures are closely related to function objects; the transformation from the former to the latter is known as defunctionalization or lambda lifting; see also closure conversion.
== Differences in semantics ==
=== Lexical environment ===
As different languages do not always have a common definition of the lexical environment, their definitions of closure may vary also. The commonly held minimalist definition of the lexical environment defines it as a set of all bindings of variables in the scope, and that is also what closures in any language have to capture. However the meaning of a variable binding also differs. In imperative languages, variables bind to relative locations in memory that can store values. Although the relative location of a binding does not change at runtime, the value in the bound location can. In such languages, since closure captures the binding, any operation on the variable, whether done from the closure or not, are performed on the same relative memory location. This is often called capturing the variable "by reference". Here is an example illustrating the concept in ECMAScript, which is one such language:
Function foo and the closures referred to by variables f and g all use the same relative memory location signified by local variable x.
In some instances the above behaviour may be undesirable, and it is necessary to bind a different lexical closure. Again in ECMAScript, this would be done using the Function.bind().
=== Example 1: Reference to an unbound variable ===
=== Example 2: Accidental reference to a bound variable ===
For this example the expected behaviour would be that each link should emit its id when clicked; but because the variable 'e' is bound to the scope above, and lazy evaluated on click, what actually happens is that each on click event emits the id of the last element in 'elements' bound at the end of the for loop.
Again here variable e would need to be bound by the scope of the block using handle.bind(this) or the let keyword.
On the other hand, many functional languages, such as ML, bind variables directly to values. In this case, since there is no way to change the value of the variable once it is bound, there is no need to share the state between closures—they just use the same values. This is often called capturing the variable "by value". Java's local and anonymous classes also fall into this category—they require captured local variables to be final, which also means there is no need to share state.
Some languages enable choosing between capturing the value of a variable or its location. For example, in C++11, captured variables are either declared with [&], which means captured by reference, or with [=], which means captured by value.
Yet another subset, lazy functional languages such as Haskell, bind variables to results of future computations rather than values. Consider this example in Haskell:
The binding of r captured by the closure defined within function foo is to the computation (x / y)—which in this case results in division by zero. However, since it is the computation that is captured, and not the value, the error only manifests when the closure is invoked, and then attempts to use the captured binding.
=== Closure leaving ===
Yet more differences manifest themselves in the behavior of other lexically scoped constructs, such as return, break and continue statements. Such constructs can, in general, be considered in terms of invoking an escape continuation established by an enclosing control statement (in case of break and continue, such interpretation requires looping constructs to be considered in terms of recursive function calls). In some languages, such as ECMAScript, return refers to the continuation established by the closure lexically innermost with respect to the statement—thus, a return within a closure transfers control to the code that called it. However, in Smalltalk, the superficially similar operator ^ invokes the escape continuation established for the method invocation, ignoring the escape continuations of any intervening nested closures. The escape continuation of a particular closure can only be invoked in Smalltalk implicitly by reaching the end of the closure's code. These examples in ECMAScript and Smalltalk highlight the difference:
The above code snippets will behave differently because the Smalltalk ^ operator and the JavaScript return operator are not analogous. In the ECMAScript example, return x will leave the inner closure to begin a new iteration of the forEach loop, whereas in the Smalltalk example, ^x will abort the loop and return from the method foo.
Common Lisp provides a construct that can express either of the above actions: Lisp (return-from foo x) behaves as Smalltalk ^x, while Lisp (return-from nil x) behaves as JavaScript return x. Hence, Smalltalk makes it possible for a captured escape continuation to outlive the extent in which it can be successfully invoked. Consider:
When the closure returned by the method foo is invoked, it attempts to return a value from the invocation of foo that created the closure. Since that call has already returned and the Smalltalk method invocation model does not follow the spaghetti stack discipline to facilitate multiple returns, this operation results in an error.
Some languages, such as Ruby, enable the programmer to choose the way return is captured. An example in Ruby:
Both Proc.new and lambda in this example are ways to create a closure, but semantics of the closures thus created are different with respect to the return statement.
In Scheme, definition and scope of the return control statement is explicit (and only arbitrarily named 'return' for the sake of the example). The following is a direct translation of the Ruby sample.
== Closure-like constructs ==
Some languages have features which simulate the behavior of closures. In languages such as C++, C#, D, Java, Objective-C, and Visual Basic (.NET) (VB.NET), these features are the result of the language's object-oriented paradigm.
=== Callbacks (C) ===
Some C libraries support callbacks. This is sometimes implemented by providing two values when registering the callback with the library: a function pointer and a separate void* pointer to arbitrary data of the user's choice. When the library executes the callback function, it passes along the data pointer. This enables the callback to maintain state and to refer to information captured at the time it was registered with the library. The idiom is similar to closures in functionality, but not in syntax. The void* pointer is not type safe so this C idiom differs from type-safe closures in C#, Haskell or ML.
Callbacks are used extensively in graphical user interface (GUI) widget toolkits to implement event-driven programming by associating general functions of graphical widgets (menus, buttons, check boxes, sliders, spinners, etc.) with application-specific functions implementing the specific desired behavior for the application.
==== Nested function and function pointer (C) ====
With a GNU Compiler Collection (GCC) extension, a nested function can be used and a function pointer can emulate closures, provided the function does not exit the containing scope. The next example is invalid because adder is a top-level definition (depending on compiler version, it could produce a correct result if compiled with no optimizing, i.e., at -O0):
But moving adder (and, optionally, the typedef) in main makes it valid:
If executed this now prints 11 as expected.
=== Local classes and lambda functions (Java) ===
Java enables classes to be defined inside methods. These are called local classes. When such classes are not named, they are known as anonymous classes (or anonymous inner classes). A local class (either named or anonymous) may refer to names in lexically enclosing classes, or read-only variables (marked as final) in the lexically enclosing method.
The capturing of final variables enables capturing variables by value. Even if the variable to capture is non-final, it can always be copied to a temporary final variable just before the class.
Capturing of variables by reference can be emulated by using a final reference to a mutable container, for example, a one-element array. The local class will not be able to change the value of the container reference, but it will be able to change the contents of the container.
With the advent of Java 8's lambda expressions, the closure causes the above code to be executed as:
Local classes are one of the types of inner class that are declared within the body of a method. Java also supports inner classes that are declared as non-static members of an enclosing class. They are normally referred to just as "inner classes". These are defined in the body of the enclosing class and have full access to instance variables of the enclosing class. Due to their binding to these instance variables, an inner class may only be instantiated with an explicit binding to an instance of the enclosing class using a special syntax.
Upon execution, this will print the integers from 0 to 9. Beware to not confuse this type of class with the nested class, which is declared in the same way with an accompanied usage of the "static" modifier; those have not the desired effect but are instead just classes with no special binding defined in an enclosing class.
As of Java 8, Java supports functions as first class objects. Lambda expressions of this form are considered of type Function<T,U> with T being the domain and U the image type. The expression can be called with its .apply(T t) method, but not with a standard method call.
=== Blocks (C, C++, Objective-C 2.0) ===
Apple introduced blocks, a form of closure, as a nonstandard extension into C, C++, Objective-C 2.0 and in Mac OS X 10.6 "Snow Leopard" and iOS 4.0. Apple made their implementation available for the GCC and clang compilers.
Pointers to block and block literals are marked with ^. Normal local variables are captured by value when the block is created, and are read-only inside the block. Variables to be captured by reference are marked with __block. Blocks that need to persist outside of the scope they are created in may need to be copied.
=== Delegates (C#, VB.NET, D) ===
C# anonymous methods and lambda expressions support closure:
Visual Basic .NET, which has many language features similar to those of C#, also supports lambda expressions with closures:
In D, closures are implemented by delegates, a function pointer paired with a context pointer (e.g. a class instance, or a stack frame on the heap in the case of closures).
D version 1, has limited closure support. For example, the above code will not work correctly, because the variable a is on the stack, and after returning from test(), it is no longer valid to use it (most probably calling foo via dg(), will return a 'random' integer). This can be solved by explicitly allocating the variable 'a' on heap, or using structs or class to store all needed closed variables and construct a delegate from a method implementing the same code. Closures can be passed to other functions, as long as they are only used while the referenced values are still valid (for example calling another function with a closure as a callback parameter), and are useful for writing generic data processing code, so this limitation, in practice, is often not an issue.
This limitation was fixed in D version 2 - the variable 'a' will be automatically allocated on the heap because it is used in the inner function, and a delegate of that function can escape the current scope (via assignment to dg or return). Any other local variables (or arguments) that are not referenced by delegates or that are only referenced by delegates that do not escape the current scope, remain on the stack, which is simpler and faster than heap allocation. The same is true for inner's class methods that reference a function's variables.
=== Function objects (C++) ===
C++ enables defining function objects by overloading operator(). These objects behave somewhat like functions in a functional programming language. They may be created at runtime and may contain state, but they do not implicitly capture local variables as closures do. As of the 2011 revision, the C++ language also supports closures, which are a type of function object constructed automatically from a special language construct called lambda-expression. A C++ closure may capture its context either by storing copies of the accessed variables as members of the closure object or by reference. In the latter case, if the closure object escapes the scope of a referenced object, invoking its operator() causes undefined behavior since C++ closures do not extend the lifetime of their context.
=== Inline agents (Eiffel) ===
Eiffel includes inline agents defining closures. An inline agent is an object representing a routine, defined by giving the code of the routine in-line. For example, in
the argument to subscribe is an agent, representing a procedure with two arguments; the procedure finds the country at the corresponding coordinates and displays it. The whole agent is "subscribed" to the event type click_event for a
certain button, so that whenever an instance of the event type occurs on that button – because a user has clicked the button – the procedure will be executed with the mouse coordinates being passed as arguments for x and y.
The main limitation of Eiffel agents, which distinguishes them from closures in other languages, is that they cannot reference local variables from the enclosing scope. This design decision helps in avoiding ambiguity when talking about a local variable value in a closure - should it be the latest value of the variable or the value captured when the agent is created? Only Current (a reference to current object, analogous to this in Java), its features, and arguments of the agent can be accessed from within the agent body. The values of the outer local variables can be passed by providing additional closed operands to the agent.
=== C++Builder __closure reserved word ===
Embarcadero C++Builder provides the reserved word __closure to provide a pointer to a method with a similar syntax to a function pointer.
Standard C allows writing a typedef for a pointer to a function type using the following syntax:In a similar way, a typedef can be declared for a pointer to a method using this syntax:
== See also ==
== Notes ==
== References ==
== External links ==
Original "Lambda Papers": A classic series of papers by Guy L. Steele Jr. and Gerald Jay Sussman discussing, among other things, the versatility of closures in the context of Scheme (where they appear as lambda expressions).
Gafter, Neal (28 January 2007). "A Definition of Closures".
Bracha, Gilad; Gafter, Neal; Gosling, James; von der Ahé, Peter. "Closures for the Java Programming Language (v0.5)".
Closures: An article about closures in dynamically typed imperative languages, by Martin Fowler.
Collection closure methods: An example of a technical domain where using closures is convenient, by Martin Fowler. | Wikipedia/Closure_(computer_science) |
In computer programming, a function (also procedure, method, subroutine, routine, or subprogram) is a callable unit of software logic that has a well-defined interface and behavior and can be invoked multiple times.
Callable units provide a powerful programming tool. The primary purpose is to allow for the decomposition of a large and/or complicated problem into chunks that have relatively low cognitive load and to assign the chunks meaningful names (unless they are anonymous). Judicious application can reduce the cost of developing and maintaining software, while increasing its quality and reliability.
Callable units are present at multiple levels of abstraction in the programming environment. For example, a programmer may write a function in source code that is compiled to machine code that implements similar semantics. There is a callable unit in the source code and an associated one in the machine code, but they are different kinds of callable units – with different implications and features.
== Terminology ==
Some programming languages, such as COBOL and BASIC, make a distinction between functions that return a value (typically called "functions") and those that do not (typically called "subprogram", "subroutine", or "procedure"). Other programming languages, such as C, C++, and Rust, only use the term "function" irrespective of whether they return a value or not. Some object-oriented languages, such as Java and C#, refer to functions inside classes as "methods".
== History ==
The idea of a callable unit was initially conceived by John Mauchly and Kathleen Antonelli during their work on ENIAC and recorded in a January 1947 Harvard symposium on "Preparation of Problems for EDVAC-type Machines." Maurice Wilkes, David Wheeler, and Stanley Gill are generally credited with the formal invention of this concept, which they termed a closed sub-routine, contrasted with an open subroutine or macro. However, Alan Turing had discussed subroutines in a paper of 1945 on design proposals for the NPL ACE, going so far as to invent the concept of a return address stack.
The idea of a subroutine was worked out after computing machines had already existed for some time. The arithmetic and conditional jump instructions were planned ahead of time and have changed relatively little, but the special instructions used for procedure calls have changed greatly over the years. The earliest computers and microprocessors, such as the Manchester Baby and the RCA 1802, did not have a single subroutine call instruction. Subroutines could be implemented, but they required programmers to use the call sequence—a series of instructions—at each call site.
Subroutines were implemented in Konrad Zuse's Z4 in 1945.
In 1945, Alan M. Turing used the terms "bury" and "unbury" as a means of calling and returning from subroutines.
In January 1947 John Mauchly presented general notes at 'A Symposium of Large Scale Digital Calculating Machinery'
under the joint sponsorship of Harvard University and the Bureau of Ordnance, United States Navy. Here he discusses serial and parallel operation suggesting
...the structure of the machine need not be complicated one bit. It is possible, since all the logical characteristics essential to this procedure are available, to evolve a coding instruction for placing the subroutines in the memory at places known to the machine, and in such a way that they may easily be called into use.In other words, one can designate subroutine A as division and subroutine B as complex multiplication and subroutine C as the evaluation of a standard error of a sequence of numbers, and so on through the list of subroutines needed for a particular problem. ... All these subroutines will then be stored in the machine, and all one needs to do is make a brief reference to them by number, as they are indicated in the coding.
Kay McNulty had worked closely with John Mauchly on the ENIAC team and developed an idea for subroutines for the ENIAC computer she was programming during World War II. She and the other ENIAC programmers used the subroutines to help calculate missile trajectories.
Goldstine and von Neumann wrote a paper dated 16 August 1948 discussing the use of subroutines.
Some very early computers and microprocessors, such as the IBM 1620, the Intel 4004 and Intel 8008, and the PIC microcontrollers, have a single-instruction subroutine call that uses a dedicated hardware stack to store return addresses—such hardware supports only a few levels of subroutine nesting, but can support recursive subroutines. Machines before the mid-1960s—such as the UNIVAC I, the PDP-1, and the IBM 1130—typically use a calling convention which saved the instruction counter in the first memory location of the called subroutine. This allows arbitrarily deep levels of subroutine nesting but does not support recursive subroutines. The IBM System/360 had a subroutine call instruction that placed the saved instruction counter value into a general-purpose register; this can be used to support arbitrarily deep subroutine nesting and recursive subroutines. The Burroughs B5000 (1961) is one of the first computers to store subroutine return data on a stack.
The DEC PDP-6 (1964) is one of the first accumulator-based machines to have a subroutine call instruction that saved the return address in a stack addressed by an accumulator or index register. The later PDP-10 (1966), PDP-11 (1970) and VAX-11 (1976) lines followed suit; this feature also supports both arbitrarily deep subroutine nesting and recursive subroutines.
=== Language support ===
In the very early assemblers, subroutine support was limited. Subroutines were not explicitly separated from each other or from the main program, and indeed the source code of a subroutine could be interspersed with that of other subprograms. Some assemblers would offer predefined macros to generate the call and return sequences. By the 1960s, assemblers usually had much more sophisticated support for both inline and separately assembled subroutines that could be linked together.
One of the first programming languages to support user-written subroutines and functions was FORTRAN II. The IBM FORTRAN II compiler was released in 1958. ALGOL 58 and other early programming languages also supported procedural programming.
=== Libraries ===
Even with this cumbersome approach, subroutines proved very useful. They allowed the use of the same code in many different programs. Memory was a very scarce resource on early computers, and subroutines allowed significant savings in the size of programs.
Many early computers loaded the program instructions into memory from a punched paper tape. Each subroutine could then be provided by a separate piece of tape, loaded or spliced before or after the main program (or "mainline"); and the same subroutine tape could then be used by many different programs. A similar approach was used in computers that loaded program instructions from punched cards. The name subroutine library originally meant a library, in the literal sense, which kept indexed collections of tapes or decks of cards for collective use.
=== Return by indirect jump ===
To remove the need for self-modifying code, computer designers eventually provided an indirect jump instruction, whose operand, instead of being the return address itself, was the location of a variable or processor register containing the return address.
On those computers, instead of modifying the function's return jump, the calling program would store the return address in a variable so that when the function completed, it would execute an indirect jump that would direct execution to the location given by the predefined variable.
=== Jump to subroutine ===
Another advance was the jump to subroutine instruction, which combined the saving of the return address with the calling jump, thereby minimizing overhead significantly.
In the IBM System/360, for example, the branch instructions BAL or BALR, designed for procedure calling, would save the return address in a processor register specified in the instruction, by convention register 14. To return, the subroutine had only to execute an indirect branch instruction (BR) through that register. If the subroutine needed that register for some other purpose (such as calling another subroutine), it would save the register's contents to a private memory location or a register stack.
In systems such as the HP 2100, the JSB instruction would perform a similar task, except that the return address was stored in the memory location that was the target of the branch. Execution of the procedure would actually begin at the next memory location. In the HP 2100 assembly language, one would write, for example
to call a subroutine called MYSUB from the main program. The subroutine would be coded as
The JSB instruction placed the address of the NEXT instruction (namely, BB) into the location specified as its operand (namely, MYSUB), and then branched to the NEXT location after that (namely, AA = MYSUB + 1). The subroutine could then return to the main program by executing the indirect jump JMP MYSUB, I which branched to the location stored at location MYSUB.
Compilers for Fortran and other languages could easily make use of these instructions when available. This approach supported multiple levels of calls; however, since the return address, parameters, and return values of a subroutine were assigned fixed memory locations, it did not allow for recursive calls.
Incidentally, a similar method was used by Lotus 1-2-3, in the early 1980s, to discover the recalculation dependencies in a spreadsheet. Namely, a location was reserved in each cell to store the return address. Since circular references are not allowed for natural recalculation order, this allows a tree walk without reserving space for a stack in memory, which was very limited on small computers such as the IBM PC.
=== Call stack ===
Most modern implementations of a function call use a call stack, a special case of the stack data structure, to implement function calls and returns. Each procedure call creates a new entry, called a stack frame, at the top of the stack; when the procedure returns, its stack frame is deleted from the stack, and its space may be used for other procedure calls. Each stack frame contains the private data of the corresponding call, which typically includes the procedure's parameters and internal variables, and the return address.
The call sequence can be implemented by a sequence of ordinary instructions (an approach still used in reduced instruction set computing (RISC) and very long instruction word (VLIW) architectures), but many traditional machines designed since the late 1960s have included special instructions for that purpose.
The call stack is usually implemented as a contiguous area of memory. It is an arbitrary design choice whether the bottom of the stack is the lowest or highest address within this area, so that the stack may grow forwards or backwards in memory; however, many architectures chose the latter.
Some designs, notably some Forth implementations, used two separate stacks, one mainly for control information (like return addresses and loop counters) and the other for data. The former was, or worked like, a call stack and was only indirectly accessible to the programmer through other language constructs while the latter was more directly accessible.
When stack-based procedure calls were first introduced, an important motivation was to save precious memory. With this scheme, the compiler does not have to reserve separate space in memory for the private data (parameters, return address, and local variables) of each procedure. At any moment, the stack contains only the private data of the calls that are currently active (namely, which have been called but haven't returned yet). Because of the ways in which programs were usually assembled from libraries, it was (and still is) not uncommon to find programs that include thousands of functions, of which only a handful are active at any given moment. For such programs, the call stack mechanism could save significant amounts of memory. Indeed, the call stack mechanism can be viewed as the earliest and simplest method for automatic memory management.
However, another advantage of the call stack method is that it allows recursive function calls, since each nested call to the same procedure gets a separate instance of its private data.
In a multi-threaded environment, there is generally more than one stack. An environment that fully supports coroutines or lazy evaluation may use data structures other than stacks to store their activation records.
==== Delayed stacking ====
One disadvantage of the call stack mechanism is the increased cost of a procedure call and its matching return. The extra cost includes incrementing and decrementing the stack pointer (and, in some architectures, checking for stack overflow), and accessing the local variables and parameters by frame-relative addresses, instead of absolute addresses. The cost may be realized in increased execution time, or increased processor complexity, or both.
This overhead is most obvious and objectionable in leaf procedures or leaf functions, which return without making any procedure calls themselves. To reduce that overhead, many modern compilers try to delay the use of a call stack until it is really needed. For example, the call of a procedure P may store the return address and parameters of the called procedure in certain processor registers, and transfer control to the procedure's body by a simple jump. If the procedure P returns without making any other call, the call stack is not used at all. If P needs to call another procedure Q, it will then use the call stack to save the contents of any registers (such as the return address) that will be needed after Q returns.
== Features ==
In general, a callable unit is a list of instructions that, starting at the first instruction, executes sequentially except as directed via its internal logic. It can be invoked (called) many times during the execution of a program. Execution continues at the next instruction after the call instruction when it returns control.
== Implementations ==
The features of implementations of callable units evolved over time and varies by context.
This section describes features of the various common implementations.
=== General characteristics ===
Most modern programming languages provide features to define and call functions, including syntax for accessing such features, including:
Delimit the implementation of a function from the rest of the program
Assign an identifier, name, to a function
Define formal parameters with a name and data type for each
Assign a data type to the return value, if any
Specify a return value in the function body
Call a function
Provide actual parameters that correspond to a called function's formal parameters
Return control to the caller at the point of call
Consume the return value in the caller
Dispose of the values returned by a call
Provide a private naming scope for variables
Identify variables outside the function that are accessible within it
Propagate an exceptional condition out of a function and to handle it in the calling context
Package functions into a container such as module, library, object, or class
=== Naming ===
Some languages, such as Pascal, Fortran, Ada and many dialects of BASIC, use a different name for a callable unit that returns a value (function or subprogram) vs. one that does not (subroutine or procedure).
Other languages, such as C, C++, C# and Lisp, use only one name for a callable unit, function. The C-family languages use the keyword void to indicate no return value.
=== Call syntax ===
If declared to return a value, a call can be embedded in an expression in order to consume the return value. For example, a square root callable unit might be called like y = sqrt(x).
A callable unit that does not return a value is called as a stand-alone statement like print("hello"). This syntax can also be used for a callable unit that returns a value, but the return value will be ignored.
Some older languages require a keyword for calls that do not consume a return value, like CALL print("hello").
=== Parameters ===
Most implementations, especially in modern languages, support parameters which the callable declares as formal parameters. A caller passes actual parameters, a.k.a. arguments, to match. Different programming languages provide different conventions for passing arguments.
=== Return value ===
In some languages, such as BASIC, a callable has different syntax (i.e. keyword) for a callable that returns a value vs. one that does not.
In other languages, the syntax is the same regardless.
In some of these languages an extra keyword is used to declare no return value; for example void in C, C++ and C#.
In some languages, such as Python, the difference is whether the body contains a return statement with a value, and a particular callable may return with or without a value based on control flow.
=== Side effects ===
In many contexts, a callable may have side effect behavior such as modifying passed or global data, reading from or writing to a peripheral device, accessing a file, halting the program or the machine, or temporarily pausing program execution.
Side effects are considered undesireble by Robert C. Martin, who is known for promoting design principles. Martin argues that side effects can result in temporal coupling or order dependencies.
In strictly functional programming languages such as Haskell, a function can have no side effects, which means it cannot change the state of the program. Functions always return the same result for the same input. Such languages typically only support functions that return a value, since there is no value in a function that has neither return value nor side effect.
=== Local variables ===
Most contexts support local variables – memory owned by a callable to hold intermediate values. These variables are typically stored in the call's activation record on the call stack along with other information such as the return address.
=== Nested call – recursion ===
If supported by the language, a callable may call itself, causing its execution to suspend while another nested execution of the same callable executes. Recursion is a useful means to simplify some complex algorithms and break down complex problems. Recursive languages provide a new copy of local variables on each call. If the programmer desires the recursive callable to use the same variables instead of using locals, they typically declare them in a shared context such static or global.
Languages going back to ALGOL, PL/I and C and modern languages, almost invariably use a call stack, usually supported by the instruction sets to provide an activation record for each call. That way, a nested call can modify its local variables without affecting any of the suspended calls variables.
Recursion allows direct implementation of functionality defined by mathematical induction and recursive divide and conquer algorithms. Here is an example of a recursive function in C/C++ to find Fibonacci numbers:
Early languages like Fortran did not initially support recursion because only one set of variables and return address were allocated for each callable. Early computer instruction sets made storing return addresses and variables on a stack difficult. Machines with index registers or general-purpose registers, e.g., CDC 6000 series, PDP-6, GE 635, System/360, UNIVAC 1100 series, could use one of those registers as a stack pointer.
=== Nested scope ===
Some languages, e.g., Ada, Pascal, PL/I, Python, support declaring and defining a function inside, e.g., a function body, such that the name of the inner is only visible within the body of the outer.
=== Reentrancy ===
If a callable can be executed properly even when another execution of the same callable is already in progress, that callable is said to be reentrant. A reentrant callable is also useful in multi-threaded situations since multiple threads can call the same callable without fear of interfering with each other. In the IBM CICS transaction processing system, quasi-reentrant was a slightly less restrictive, but similar, requirement for application programs that were shared by many threads.
=== Overloading ===
Some languages support overloading – allow multiple callables with the same name in the same scope, but operating on different types of input. Consider the square root function applied to real number, complex number and matrix input. The algorithm for each type of input is different, and the return value may have a different type. By writing three separate callables with the same name. i.e. sqrt, the resulting code may be easier to write and to maintain since each one has a name that is relatively easy to understand and to remember instead of giving longer and more complicated names like sqrt_real, sqrt_complex, qrt_matrix.
Overloading is supported in many languages that support strong typing. Often the compiler selects the overload to call based on the type of the input arguments or it fails if the input arguments do not select an overload. Older and weakly-typed languages generally do not support overloading.
Here is an example of overloading in C++, two functions Area that accept different types:
PL/I has the GENERIC attribute to define a generic name for a set of entry references called with different types of arguments. Example:
DECLARE gen_name GENERIC(
name WHEN(FIXED BINARY),
flame WHEN(FLOAT),
pathname OTHERWISE);
Multiple argument definitions may be specified for each entry. A call to "gen_name" will result in a call to "name" when the argument is FIXED BINARY, "flame" when FLOAT", etc. If the argument matches none of the choices "pathname" will be called.
=== Closure ===
A closure is a callable plus values of some of its variables captured from the environment in which it was created. Closures were a notable feature of the Lisp programming language, introduced by John McCarthy. Depending on the implementation, closures can serve as a mechanism for side-effects.
=== Exception reporting ===
Besides its happy path behavior, a callable may need to inform the caller about an exceptional condition that occurred during its execution.
Most modern languages support exceptions which allows for exceptional control flow that pops the call stack until an exception handler is found to handle the condition.
Languages that do not support exceptions can use the return value to indicate success or failure of a call. Another approach is to use a well-known location like a global variable for success indication. A callable writes the value and the caller reads it after a call.
In the IBM System/360, where return code was expected from a subroutine, the return value was often designed to be a multiple of 4—so that it could be used as a direct branch table index into a branch table often located immediately after the call instruction to avoid extra conditional tests, further improving efficiency. In the System/360 assembly language, one would write, for example:
=== Call overhead ===
A call has runtime overhead, which may include but is not limited to:
Allocating and reclaiming call stack storage
Saving and restoring processor registers
Copying input variables
Copying values after the call into the caller's context
Automatic testing of the return code
Handling of exceptions
Dispatching such as for a virtual method in an object-oriented language
Various techniques are employed to minimize the runtime cost of calls.
==== Compiler optimization ====
Some optimizations for minimizing call overhead may seem straight forward, but cannot be used if the callable has side effects. For example, in the expression (f(x)-1)/(f(x)+1), the function f cannot be called only once with its value used two times since the two calls may return different results. Moreover, in the few languages which define the order of evaluation of the division operator's operands, the value of x must be fetched again before the second call, since the first call may have changed it. Determining whether a callable has a side effect is difficult – indeed, undecidable by virtue of Rice's theorem. So, while this optimization is safe in a purely functional programming language, a compiler for a language not limited to functional typically assumes the worst case, that every callable may have side effects.
==== Inlining ====
Inlining eliminates calls for particular callables. The compiler replaces each call with the compiled code of the callable. Not only does this avoid the call overhead, but it also allows the compiler to optimize code of the caller more effectively by taking into account the context and arguments at that call. Inlining, however, usually increases the compiled code size, except when only called once or the body is very short, like one line.
=== Sharing ===
Callables can be defined within a program, or separately in a library that can be used by multiple programs.
=== Inter-operability ===
A compiler translates call and return statements into machine instructions according to a well-defined calling convention. For code compiled by the same or a compatible compiler, functions can be compiled separately from the programs that call them. The instruction sequences corresponding to call and return statements are called the procedure's prologue and epilogue.
=== Built-in functions ===
A built-in function, or builtin function, or intrinsic function, is a function for which the compiler generates code at compile time or provides in a way other than for other functions. A built-in function does not need to be defined like other functions since it is built in to the programming language.
== Programming ==
=== Trade-offs ===
==== Advantages ====
Advantages of breaking a program into functions include:
Decomposing a complex programming task into simpler steps: this is one of the two main tools of structured programming, along with data structures
Reducing duplicate code within a program
Enabling reuse of code across multiple programs
Dividing a large programming task among various programmers or various stages of a project
Hiding implementation details from users of the function
Improving readability of code by replacing a block of code with a function call where a descriptive function name serves to describe the block of code. This makes the calling code concise and readable even if the function is not meant to be reused.
Improving traceability (i.e. most languages offer ways to obtain the call trace which includes the names of the involved functions and perhaps even more information such as file names and line numbers); by not decomposing the code into functions, debugging would be severely impaired
==== Disadvantages ====
Compared to using in-line code, invoking a function imposes some computational overhead in the call mechanism.
A function typically requires standard housekeeping code – both at the entry to, and exit from, the function (function prologue and epilogue – usually saving general purpose registers and return address as a minimum).
=== Conventions ===
Many programming conventions have been developed regarding callables.
With respect to naming, many developers name a callable with a phrase starting with a verb when it does a certain task, with an adjective when it makes an inquiry, and with a noun when it is used to substitute variables.
Some programmers suggest that a callable should perform exactly one task, and if it performs more than one task, it should be split up into multiple callables. They argue that callables are key components in software maintenance, and their roles in the program must remain distinct.
Proponents of modular programming advocate that each callable should have minimal dependency on the rest of the codebase. For example, the use of global variables is generally deemed unwise, because it adds coupling between all callables that use the global variables. If such coupling is not necessary, they advise to refactor callables to accept passed parameters instead.
== Examples ==
=== Early BASIC ===
Early BASIC variants require each line to have a unique number (line number) that orders the lines for execution, provides no separation of the code that is callable, no mechanism for passing arguments or to return a value and all variables are global. It provides the command GOSUB where sub is short for sub procedure, subprocedure or subroutine. Control jumps to the specified line number and then continues on the next line on return.
This code repeatedly asks the user to enter a number and reports the square root of the value. Lines 100-130 are the callable.
=== Small Basic ===
In Microsoft Small Basic, targeted to the student first learning how to program in a text-based language, a callable unit is called a subroutine.
The Sub keyword denotes the start of a subroutine and is followed by a name identifier. Subsequent lines are the body which ends with the EndSub keyword.
This can be called as SayHello().
=== Visual Basic ===
In later versions of Visual Basic (VB), including the latest product line and VB6, the term procedure is used for the callable unit concept. The keyword Sub is used to return no value and Function to return a value. When used in the context of a class, a procedure is a method.
Each parameter has a data type that can be specified, but if not, defaults to Object for later versions based on .NET and variant for VB6.
VB supports parameter passing conventions by value and by reference via the keywords ByVal and ByRef, respectively.
Unless ByRef is specified, an argument is passed ByVal. Therefore, ByVal is rarely explicitly specified.
For a simple type like a number these conventions are relatively clear. Passing ByRef allows the procedure to modify the passed variable whereas passing ByVal does not. For an object, semantics can confuse programmers since an object is always treated as a reference. Passing an object ByVal copies the reference; not the state of the object. The called procedure can modify the state of the object via its methods yet cannot modify the object reference of the actual parameter.
The does not return a value and has to be called stand-alone, like DoSomething
This returns the value 5, and a call can be part of an expression like y = x + GiveMeFive()
This has a side-effect – modifies the variable passed by reference and could be called for variable v like AddTwo(v). Giving v is 5 before the call, it will be 7 after.
=== C and C++ ===
In C and C++, a callable unit is called a function.
A function definition starts with the name of the type of value that it returns or void to indicate that it does not return a value. This is followed by the function name, formal arguments in parentheses, and body lines in braces.
In C++, a function declared in a class (as non-static) is called a member function or method. A function outside of a class can be called a free function to distinguish it from a member function.
This function does not return a value and is always called stand-alone, like doSomething()
This function returns the integer value 5. The call can be stand-alone or in an expression like y = x + giveMeFive()
This function has a side-effect – modifies the value passed by address to the input value plus 2. It could be called for variable v as addTwo(&v) where the ampersand (&) tells the compiler to pass the address of a variable. Giving v is 5 before the call, it will be 7 after.
This function requires C++ – would not compile as C. It has the same behavior as the preceding example but passes the actual parameter by reference rather than passing its address. A call such as addTwo(v) does not include an ampersand since the compiler handles passing by reference without syntax in the call.
=== PL/I ===
In PL/I a called procedure may be passed a descriptor providing information about the argument, such as string lengths and array bounds. This allows the procedure to be more general and eliminates the need for the programmer to pass such information. By default PL/I passes arguments by reference. A (trivial) function to change the sign of each element of a two-dimensional array might look like:
change_sign: procedure(array);
declare array(*,*) float;
array = -array;
end change_sign;
This could be called with various arrays as follows:
/* first array bounds from -5 to +10 and 3 to 9 */
declare array1 (-5:10, 3:9)float;
/* second array bounds from 1 to 16 and 1 to 16 */
declare array2 (16,16) float;
call change_sign(array1);
call change_sign(array2);
=== Python ===
In Python, the keyword def denotes the start of a function definition. The statements of the function body follow as indented on subsequent lines and end at the line that is indented the same as the first line or end of file.
The first function returns greeting text that includes the name passed by the caller. The second function calls the first and is called like greet_martin() to write "Welcome Martin" to the console.
=== Prolog ===
In the procedural interpretation of logic programs, logical implications behave as goal-reduction procedures. A rule (or clause) of the form:
A :- B
which has the logical reading:
A if B
behaves as a procedure that reduces goals that unify with A to subgoals that are instances ofB.
Consider, for example, the Prolog program:
Notice that the motherhood function, X = mother(Y) is represented by a relation, as in a relational database. However, relations in Prolog function as callable units.
For example, the procedure call ?- parent_child(X, charles) produces the output X = elizabeth. But the same procedure can be called with other input-output patterns. For example:
== See also ==
Asynchronous procedure call, a subprogram that is called after its parameters are set by other activities
Command–query separation (CQS)
Compound operation
Coroutines, subprograms that call each other as if both were the main programs
Evaluation strategy
Event handler, a subprogram that is called in response to an input event or interrupt
Function (mathematics)
Functional programming
Fused operation
Intrinsic function
Lambda function (computer programming), a function that is not bound to an identifier
Logic programming
Modular programming
Operator overloading
Protected procedure
Transclusion
== References == | Wikipedia/Procedure_(computer_science) |
In computing, a parallel programming model is an abstraction of parallel computer architecture, with which it is convenient to express algorithms and their composition in programs. The value of a programming model can be judged on its generality: how well a range of different problems can be expressed for a variety of different architectures, and its performance: how efficiently the compiled programs can execute. The implementation of a parallel programming model can take the form of a library invoked from a programming language, as an extension to an existing languages.
Consensus around a particular programming model is important because it leads to different parallel computers being built with support for the model, thereby facilitating portability of software. In this sense, programming models are referred to as bridging between hardware and software.
== Classification of parallel programming models ==
Classifications of parallel programming models can be divided broadly into two areas: process interaction and problem decomposition.
=== Process interaction ===
Process interaction relates to the mechanisms by which parallel processes are able to communicate with each other. The most common forms of interaction are shared memory and message passing, but interaction can also be implicit (invisible to the programmer).
==== Shared memory ====
Shared memory is an efficient means of passing data between processes. In a shared-memory model, parallel processes share a global address space that they read and write to asynchronously. Asynchronous concurrent access can lead to race conditions, and mechanisms such as locks, semaphores and monitors can be used to avoid these. Conventional multi-core processors directly support shared memory, which many parallel programming languages and libraries, such as Cilk, OpenMP and Threading Building Blocks, are designed to exploit.
==== Message passing ====
In a message-passing model, parallel processes exchange data through passing messages to one another. These communications can be asynchronous, where a message can be sent before the receiver is ready, or synchronous, where the receiver must be ready. The Communicating sequential processes (CSP) formalisation of message passing uses synchronous communication channels to connect processes, and led to important languages such as Occam, Limbo and Go. In contrast, the actor model uses asynchronous message passing and has been employed in the design of languages such as D, Scala and SALSA.
==== Partitioned global address space ====
Partitioned Global Address Space (PGAS) models provide a middle ground between shared memory and message passing. PGAS provides a global memory address space abstraction that is logically partitioned, where a portion is local to each process. Parallel processes communicate by asynchronously performing operations (e.g. reads and writes) on the global address space, in a manner reminiscent of shared memory models. However by semantically partitioning the global address space into portions with affinity to a particular processes, they allow programmers to exploit locality of reference and enable efficient implementation on distributed memory parallel computers. PGAS is offered by many parallel programming languages and libraries, such as Fortran 2008, Chapel, UPC++, and SHMEM.
==== Implicit interaction ====
In an implicit model, no process interaction is visible to the programmer and instead the compiler and/or runtime is responsible for performing it. Two examples of implicit parallelism are with domain-specific languages where the concurrency within high-level operations is prescribed, and with functional programming languages because the absence of side-effects allows non-dependent functions to be executed in parallel. However, this kind of parallelism is difficult to manage and functional languages such as Concurrent Haskell and Concurrent ML provide features to manage parallelism explicitly and correctly.
=== Problem decomposition ===
A parallel program is composed of simultaneously executing processes. Problem decomposition relates to the way in which the constituent processes are formulated.
==== Task parallelism ====
A task-parallel model focuses on processes, or threads of execution. These processes will often be behaviourally distinct, which emphasises the need for communication. Task parallelism is a natural way to express message-passing communication. In Flynn's taxonomy, task parallelism is usually classified as MIMD/MPMD or MISD.
==== Data parallelism ====
A data-parallel model focuses on performing operations on a data set, typically a regularly structured array. A set of tasks will operate on this data, but independently on disjoint partitions. In Flynn's taxonomy, data parallelism is usually classified as MIMD/SPMD or SIMD.
==== Stream Parallelism ====
Stream parallelism, also known as pipeline parallelism, focuses on dividing a computation
into a sequence of stages, where each stage processes a portion of the input
data. Each stage operates independently and concurrently, and the output of one
stage serves as the input to the next stage. Stream parallelism is particularly suitable
for applications with continuous data streams or pipelined computations.
==== Implicit parallelism ====
As with implicit process interaction, an implicit model of parallelism reveals nothing to the programmer as the compiler, the runtime or the hardware is responsible. For example, in compilers, automatic parallelization is the process of converting sequential code into parallel code, and in computer architecture, superscalar execution is a mechanism whereby instruction-level parallelism is exploited to perform operations in parallel.
== Terminology ==
Parallel programming models are closely related to models of computation. A model of parallel computation is an abstraction used to analyze the cost of computational processes, but it does not necessarily need to be practical, in that it can be implemented efficiently in hardware and/or software. A programming model, in contrast, does specifically imply the practical considerations of hardware and software implementation.
A parallel programming language may be based on one or a combination of programming models. For example, High Performance Fortran is based on shared-memory interactions and data-parallel problem decomposition, and Go provides mechanism for shared-memory and message-passing interaction.
== Example parallel programming models ==
== See also ==
Automatic parallelization
Bridging model
Concurrency
Degree of parallelism
Explicit parallelism
List of concurrent and parallel programming languages
Optical Multi-Tree with Shuffle Exchange
Parallel external memory (Model)
== References ==
== Further reading ==
Blaise Barney, Introduction to Parallel Computing, Lawrence Livermore National Laboratory, archived from the original on 2013-06-10, retrieved 2015-11-22
Murray I. Cole., Algorithmic Skeletons: Structured Management of Parallel Computation (PDF), University of Glasgow
J. Darlinton; M. Ghanem; H. W. To (1993). "Structured parallel programming". Proceedings of Workshop on Programming Models for Massively Parallel Computers. pp. 160–169. doi:10.1109/PMMP.1993.315543. ISBN 0-8186-4900-3. S2CID 15265646.
Ian Foster, Designing and Building Parallel Programs, Argonne National Laboratory | Wikipedia/Parallel_programming_model |
Uniform function call syntax (UFCS) or uniform call syntax (UCS) or sometimes universal function call syntax is a programming language feature in D, Nim, Koka, and Effekt that allows any function to be called using the syntax for method calls (as in object-oriented programming), by using the receiver as the first parameter and the given arguments as the remaining parameters. The same technique is used in the AviSynth scripting language under the name "OOP notation".
UFCS is particularly useful when function calls are chained (behaving similar to pipes, or the various dedicated operators available in functional languages for passing values through a series of expressions). It allows free functions to fill a role similar to extension methods in some other languages. Another benefit of the syntax is related to completion systems in IDEs, which use type information to show a list of available functions, dependent on the context. When the programmer starts with an argument, the set of potentially applicable functions is greatly narrowed down, aiding discoverability.
== Examples ==
=== D programming language ===
=== Nim programming language ===
== C++ proposal ==
Proposals for a unification of member function and free function calling syntax have been discussed from the early years of C++ standardization. Glassborow (2004) proposed a uniform calling syntax (UCS), allowing specially annotated free functions to be called with member function notation.
In 2016 it was proposed a second time for addition to C++ by Bjarne Stroustrup and Herb Sutter, to reduce the ambiguous decision between writing free functions and member functions, to simplify the writing of templated code. Many programmers are tempted to write member functions to get the benefits of the member function syntax (e.g. "dot-autocomplete" to list member functions); however, this leads to excessive coupling between classes. This was again, in 2023, proposed by Herb Sutter claiming new information and insights, as well as an experimental implementation in the cppfront compiler.
== Rust usage of the term ==
Until 2018, it was common to use this term when actually referring to qualified/explicit path syntax and most commonly the fully qualified path syntax: because it is possible to have several traits defining the same method implemented on the same struct, a mechanism is needed to disambiguate which trait should be used. Member functions can also be used as free functions through a qualified (namespaced) path. The term UFCS is incorrect for these uses, as it allows using methods as (namespaced) free functions, but not using free functions as methods.
== See also ==
Trait (computer programming)
Interface (computer programming)
Go (programming language), another language with a more open philosophy to methods
Loose coupling
Duck typing
Method chaining
== References == | Wikipedia/Uniform_function_call_syntax |
In computer programming, a nested function (or nested procedure or subroutine) is a named function that is defined within another, enclosing, block and is lexically scoped within the enclosing block – meaning it is only callable by name within the body of the enclosing block and can use identifiers declared in outer blocks, including outer functions. The enclosing block is typically, but not always, another function.
Programming language support for nested functions varies. With respect to structured programming languages, it is supported in some outdated languages such as ALGOL, Simula 67 and Pascal and in the commonly used JavaScript. It is commonly supported in dynamic and functional languages.
However, it is not supported in some commonly used languages including standard C and C++.
Other programming technologies provide similar benefit. For example, a lambda function also allows for a function to be defined inside of a function (as well as elsewhere) and allows for similar data hiding and encapsulation. Notably, a lambda function has no name (is anonymous) and therefore cannot be called by name and has no visibility aspect.
== Attributes ==
The scope of a nested function is the block that contains it – be it a function block or block within a function body. It is not visible (cannot be called by name) outside its containing block.
A nested function can use identifiers (i.e. the name of functions, variables, types, classes) declared in any enclosing block, except when they are masked by inner declarations with the same names.
A nested function can be declared within a nested function, recursively, to form a deeply nested structure.
A deeply nested function can access identifiers declared in all of its enclosing blocks, including enclosing functions.
Nested functions may in certain situations lead to the creation of a closure. If it is possible for the nested function to escape the enclosing function, for example if functions are first class objects and a nested function is passed to another function or returned from the enclosing function, then a closure is created and calls to this function can access the environment of the original function. The frame of the immediately enclosing function must continue to be alive until the last referencing closure dies and non-local automatic variables referenced in closures can therefore not be stack allocated in languages that allow the closure to persist beyond the lifetime of the enclosing block. This is known as the funarg problem and is a key reason why nested functions was not implemented in some simpler languages as it significantly complicates code generation and analysis, especially when functions are nested to various levels, sharing different parts of their environment.
== Value ==
The nested function technology allows a programmer to write source code that includes beneficial attributes such as information hiding, encapsulation and decomposition. The programmer can divide a task into subtasks which are only meaningful within the context of the task such that the subtask functions are hidden from callers that are not designed to use them.
Block scoping allows functions to share the state of enclosing blocks (including enclosing functions) without passing parameters or using global variables.
== Uses ==
=== Helper ===
A nested function typically acts as a helper function or a recursive function.
=== Control flow ===
Nested functions can be used for unstructured control flow, by using the return statement for general unstructured control flow. This can be used for finer-grained control than is possible with other built-in features of the language – for example, it can allow early termination of a for loop if break is not available, or early termination of a nested for loop if a multi-level break or exceptions are not available.
=== Higher-order functions ===
In some languages, it is possible to create a nested function that accesses a set of parameters from the outer function, that is a closure, and have that function be the outer function's return value. Thus it is possible to return a function that is set to fulfill a certain task with little or no further parameters given to it, which can increase performance quite significantly.
== Examples ==
=== Simple example ===
A simple example in Pascal:
The function F is nested within E. Note that E's parameter x is also visible in F (as F is a part of E) while both x and y are invisible outside E and F respectively.
Similarly, in Standard ML:
In Haskell:
In PL/I:
e: procedure(x) returns(float);
declare x float;
f: procedure(y) returns(float);
declare y float;
return x + y
end;
return f(3.0) + f(4.0);
end;
In Python:
In GNU C – which extends standard C with nested functions:
=== Quicksort ===
The following is an implementation of quicksort:
The following is an implementation of the Hoare partition based quicksort using C++11 lambda expression syntax which is an alternative technology that also allows hiding a function inside a function:
== Languages ==
Notable languages supporting nested functions include:
ALGOL-based languages such as ALGOL 68, Simula, Pascal, Modula-2, Modula-3, Oberon, PL/I, Seed7 and Ada
Modern versions of Lisp (with lexical scope) such as Scheme, and Common Lisp
ECMAScript (JavaScript and ActionScript)
Dart
Kotlin (local functions)
Rust
Scala (nested functions)
Various degrees of support in scripting languages such as Ruby, Python, Lua, PHP and Perl
GCC supports nested functions in C, as a language extension.
C#, starting with C# 7.0
The D language, a C-related language with nested functions.
Fortran, starting with Fortran-90, supports a single level of nested (CONTAINed) subroutines and functions.
MATLAB (full support)
Wolfram Language
Golang (Function closures)
=== Functional languages ===
In most functional programming languages, such as Scheme, nested functions are a common way of implementing algorithms with loops in them. A simple (tail) recursive inner function is created, which behaves as the algorithm's main loop, while the outer function performs startup actions that only need to be done once. In more complex cases, a number of mutually recursive functions may be created as inner functions.
== Alternatives ==
Various alternative techniques can be used to achieve similar programming results as via nested functions.
=== Modularity ===
A common alternative is to leverage a language's modularity technology. Some functions are exposed for use outside of the module and some are only visible within the module.
In C, this can be implemented by declaring functions and variables as static to hide them from code outside the file. This allows for data hiding, encapsulation and decomposition, but at a different level of granularity than with nested functions. This modularity does not support more than one level of nesting.
In object-oriented languages, a class typically provides a scope in which functions and state can be hidden from consumers of the class but accessible within the class. Some languages allow classes to be nested.
=== Parameters ===
To implement data hiding, functions can pass around shared data as parameters, but this increases the complexity of function calls.
In C, this is generally implemented by passing a pointer to a structure containing the shared data.
=== Lambda ===
In PHP and other languages, the lambda is an alternative. A function is defined in a code statement rather than declared with the usual function syntax. It has no name but is callable via a function reference. Such functions can be defined inside of a function as well as in other scopes. To use local variables in the anonymous function, use closure.
=== Alternatives by language ===
The following languages provide features that are similar to nested functions:
C++ – classes allow for similar data hiding and encapsulation; defining a class within a class provides similar structure (see Function object in C++)
C++11 and later – via lambda expressions (see quicksort example above)
Eiffel – explicitly disallows nesting of routines to keep the language simple; does allow the convention of using a special variable, Result, to denote the result of a (value-returning) function
C# and Visual Basic – via lambda expressions
Java – since Java 8, via lambda expressions, and in older versions, via an anonymous class containing a single method
== Implementation ==
Implementation of nested functions can be more involved than it may appear, as a reference to a nested function that references non-local variables creates a closure. For this reason nested functions are not supported in some languages such as C, C++ or Java as this makes compilers more difficult to implement. However, some compilers do support them, as a compiler specific extension. A well known example of this is the GNU C implementation of C which shares code with compilers for languages such as Pascal, Ada and Modula.
=== Access of non-local objects ===
There are several ways to implement nested procedures in a lexically scoped language, but the classic way is as follows:
Any non-local object, X, is reached via access-links in the activation frames on the machine stack. The caller, C, assists the called procedure, P, by pushing a direct link to the latest activation of P's immediate lexical encapsulation, (P), prior to the call itself. P may then quickly find the right activation for a certain X by following a fixed number (P.depth – X.depth) of links (normally a small number).
The caller creates this direct link by (itself) following C.depth – P.depth + 1 older links, leading up to the latest activation of (P), and then temporarily bridging over these with a direct link to that activation; the link later disappears together with P, whereby the older links beneath it may come into use again.
Note that P is visible for, and may therefore be called by, C if (P) = C / (C) / ((C)) / etc.
This original method is faster than it may seem, but it is nevertheless often optimized in practical modern compilers (using displays or similar techniques).
Another way to implement nested functions that is used by some compilers is to convert ("lift") nested functions into non-nested functions (where extra, hidden, parameters replace the access links) using a process known as lambda lifting during an intermediate stage in the compilation.
=== Functions as values ===
In order for local functions with lexically scoped nonlocals to be passed as results, the language runtime code must also implicitly pass the environment (data) that the function sees inside its encapsulating function, so that it is reachable also when the current activation of the enclosing function no longer exists. This means that the environment must be stored in another memory area than (the subsequently reclaimed parts of) a chronologically based execution stack, which, in turn, implies some sort of freely dynamic memory allocation. Many older Algol based languages (or dialects thereof) does therefore not allow local functions that access nonlocals to be passed as return values, or do they not allow functions as return values at all, although passing of such functions as arguments may still be possible.
=== No-execute stacks ===
GCC's implementation of nested functions causes a loss of no-execute stacks (NX stacks). This implementation calls nested functions through a jump instruction placed on the machine stack at runtime. This requires the stack to be executable. No-execute stacks and nested functions are therefore mutually exclusive in GCC. If a nested function is used in the development of a program, then the NX stack is silently lost, unless GCC is called with the ‑Wtrampoline option to alert of the condition. Software engineered using Secure Development Lifecycle often do not allow the use of nested functions in this particular compiler due to the loss of NX stacks.
== See also ==
Call stack
Closure (computer science)
Function composition (computer science)
Inner class
Nesting (computing)
== References ==
== External links ==
comp.lang.c FAQ: Nested Functions
"6.4 Nested procedure and functions". FreePascal documentation. | Wikipedia/Nested_function |
In computer networking, linear network coding is a program in which intermediate nodes transmit data from source nodes to sink nodes by means of linear combinations.
Linear network coding may be used to improve a network's throughput, efficiency, and scalability, as well as reducing attacks and eavesdropping. The nodes of a network take several packets and combine for transmission. This process may be used to attain the maximum possible information flow in a network.
It has been proven that, theoretically, linear coding is enough to achieve the upper bound in multicast problems with one source. However linear coding is not sufficient in general; even for more general versions of linearity such as convolutional coding and filter-bank coding. Finding optimal coding solutions for general network problems with arbitrary demands is a hard problem, which can be NP-hard
and even undecidable.
== Encoding and decoding ==
In a linear network coding problem, a group of nodes
P
{\displaystyle P}
are involved in moving the data from
S
{\displaystyle S}
source nodes to
K
{\displaystyle K}
sink nodes. Each node generates new packets which are linear combinations of past received packets by multiplying them by coefficients chosen from a finite field, typically of size
G
F
(
2
s
)
{\displaystyle GF(2^{s})}
.
More formally, each node,
p
k
{\displaystyle p_{k}}
with indegree,
I
n
D
e
g
(
p
k
)
=
S
{\displaystyle InDeg(p_{k})=S}
, generates a message
X
k
{\displaystyle X_{k}}
from the linear combination of received messages
{
M
i
}
i
=
1
S
{\displaystyle \{M_{i}\}_{i=1}^{S}}
by the formula:
X
k
=
∑
i
=
1
S
g
k
i
⋅
M
i
{\displaystyle X_{k}=\sum _{i=1}^{S}g_{k}^{i}\cdot M_{i}}
Where the values
g
k
i
{\displaystyle g_{k}^{i}}
are coefficients selected from
G
F
(
2
s
)
{\displaystyle GF(2^{s})}
. Since operations are computed in a finite field, the generated message is of the same length as the original messages. Each node forwards the computed value
X
k
{\displaystyle X_{k}}
along with the coefficients,
g
k
i
{\displaystyle g_{k}^{i}}
, used in the
k
th
{\displaystyle k^{\text{th}}}
level,
g
k
i
{\displaystyle g_{k}^{i}}
.
Sink nodes receive these network coded messages, and collect them in a matrix. The original messages can be recovered by performing Gaussian elimination on the matrix. In reduced row echelon form, decoded packets correspond to the rows of the form
e
i
=
[
0...010...0
]
{\displaystyle e_{i}=[0...010...0]}
== Background ==
A network is represented by a directed graph
G
=
(
V
,
E
,
C
)
{\displaystyle {\mathcal {G}}=(V,E,C)}
.
V
{\displaystyle V}
is the set of nodes or vertices,
E
{\displaystyle E}
is the set of directed links (or edges), and
C
{\displaystyle C}
gives the capacity of each link of
E
{\displaystyle E}
. Let
T
(
s
,
t
)
{\displaystyle T(s,t)}
be the maximum possible throughput from node
s
{\displaystyle s}
to node
t
{\displaystyle t}
. By the max-flow min-cut theorem,
T
(
s
,
t
)
{\displaystyle T(s,t)}
is upper bounded by the minimum capacity of all cuts, which is the sum of the capacities of the edges on a cut, between these two nodes.
Karl Menger proved that there is always a set of edge-disjoint paths achieving the upper bound in a unicast scenario, known as the max-flow min-cut theorem. Later, the Ford–Fulkerson algorithm was proposed to find such paths in polynomial time. Then, Edmonds proved in the paper "Edge-Disjoint Branchings" the upper bound in the broadcast scenario is also achievable, and proposed a polynomial time algorithm.
However, the situation in the multicast scenario is more complicated, and in fact, such an upper bound can't be reached using traditional routing ideas. Ahlswede et al. proved that it can be achieved if additional computing tasks (incoming packets are combined into one or several outgoing packets) can be done in the intermediate nodes.
== The Butterfly Network ==
The butterfly network is often used to illustrate how linear network coding can outperform routing. Two source nodes (at the top of the picture) have information A and B that must be transmitted to the two destination nodes (at the bottom). Each destination node wants to know both A and B. Each edge can carry only a single value (we can think of an edge transmitting a bit in each time slot).
If only routing were allowed, then the central link would be only able to carry A or B, but not both. Supposing we send A through the center; then the left destination would receive A twice and not know B at all. Sending B poses a similar problem for the right destination. We say that routing is insufficient because no routing scheme can transmit both A and B to both destinations simultaneously. Meanwhile, it takes four time slots in total for both destination nodes to know A and B.
Using a simple code, as shown, A and B can be transmitted to both destinations simultaneously by sending the sum of the symbols through the two relay nodes – encoding A and B using the formula "A+B". The left destination receives A and A + B, and can calculate B by subtracting the two values. Similarly, the right destination will receive B and A + B, and will also be able to determine both A and B. Therefore, with network coding, it takes only three time slots and improves the throughput.
== Random Linear Network Coding ==
Random linear network coding (RLNC) is a simple yet powerful encoding scheme, which in broadcast transmission schemes allows close to optimal throughput using a decentralized algorithm. Nodes transmit random linear combinations of the packets they receive, with coefficients chosen randomly, with a uniform distribution from a Galois field. If the field size is sufficiently large, the probability that the receiver(s) will obtain linearly independent combinations (and therefore obtain innovative information) approaches 1. It should however be noted that, although random linear network coding has excellent throughput performance, if a receiver obtains an insufficient number of packets, it is extremely unlikely that they can recover any of the original packets. This can be addressed by sending additional random linear combinations until the receiver obtains the appropriate number of packets.
=== Operation and key parameters ===
There are three key parameters in RLNC. The first one is the generation size. In RLNC, the original data transmitted over the network is divided into packets. The source and intermediate nodes in the network can combine and recombine the set of original and coded packets. The original
M
{\displaystyle M}
packets form a block, usually called a generation. The number of original packets combined and recombined together is the generation size. The second parameter is the packet size. Usually, the size of the original packets is fixed. In the case of unequally-sized packets, these can be zero-padded if they are shorter or split into multiple packets if they are longer. In practice, the packet size can be the size of the maximum transmission unit (MTU) of the underlying network protocol. For example, it can be around 1500 bytes in an Ethernet frame. The third key parameter is the Galois field used. In practice, the most commonly used Galois fields are binary extension fields. And the most commonly used sizes for the Galois fields are the binary field
G
F
(
2
)
{\displaystyle GF(2)}
and the so-called binary-8 (
G
F
(
2
8
)
{\displaystyle GF(2^{8})}
). In the binary field, each element is one bit long, while in the binary-8, it is one byte long. Since the packet size is usually larger than the field size, each packet is seen as a set of elements from the Galois field (usually referred to as symbols) appended together. The packets have a fixed amount of symbols (Galois field elements), and since all the operations are performed over Galois fields, then the size of the packets does not change with subsequent linear combinations.
The sources and the intermediate nodes can combine any subset of the original and previously coded packets performing linear operations. To form a coded packet in RLNC, the original and previously coded packets are multiplied by randomly chosen coefficients and added together. Since each packet is just an appended set of Galois field elements, the operations of multiplication and addition are performed symbol-wise over each of the individual symbols of the packets, as shown in the picture from the example.
To preserve the statelessness of the code, the coding coefficients used to generate the coded packets are appended to the packets transmitted over the network. Therefore, each node in the network can see what coefficients were used to generate each coded packet. One novelty of linear network coding over traditional block codes is that it allows the recombination of previously coded packets into new and valid coded packets. This process is usually called recoding. After a recoding operation, the size of the appended coding coefficients does not change. Since all the operations are linear, the state of the recoded packet can be preserved by applying the same operations of addition and multiplication to the payload and the appended coding coefficients. In the following example, we will illustrate this process.
Any destination node must collect enough linearly independent coded packets to be able to reconstruct the original data. Each coded packet can be understood as a linear equation where the coefficients are known since they are appended to the packet. In these equations, each of the original
M
{\displaystyle M}
packets is the unknown. To solve the linear system of equations, the destination needs at least
M
{\displaystyle M}
linearly independent equations (packets).
==== Example ====
In the figure, we can see an example of two packets linearly combined into a new coded packet. In the example, we have two packets, namely packet
f
{\displaystyle f}
and packet
e
{\displaystyle e}
. The generation size of our example is two. We know this because each packet has two coding coefficients (
C
i
j
{\displaystyle C_{ij}}
) appended. The appended coefficients can take any value from the Galois field. However, an original, uncoded data packet would have appended the coding coefficients
[
0
,
1
]
{\displaystyle [0,1]}
or
[
1
,
0
]
{\displaystyle [1,0]}
, which means that they are constructed by a linear combination of zero times one of the packets plus one time the other packet. Any coded packet would have appended other coefficients. In our example, packet
f
{\displaystyle f}
for instance has appended the coefficients
[
C
11
,
C
12
]
{\displaystyle [C_{11},C_{12}]}
. Since network coding can be applied at any layter of the communication protocol, these packets can have a header from the other layers, which is ignored in the network coding operations.
Now, lets assume that the network node wants to produce a new coded packet combining packet
f
{\displaystyle f}
and packet
e
{\displaystyle e}
. In RLNC, it will randomly choose two coding coefficients,
d
1
{\displaystyle d_{1}}
and
d
2
{\displaystyle d_{2}}
in the example. The node will multiply each symbol of packet
f
{\displaystyle f}
by
d
1
{\displaystyle d_{1}}
, and each symbol of packet
e
{\displaystyle e}
by
d
2
{\displaystyle d_{2}}
. Then, it will add the results symbol-wise to produce the new coded data. It will perform the same operations of multiplication and addition to the coding coefficients of the coded packets.
=== Misconceptions ===
Linear network coding is still a relatively new subject. However, the topic has been vastly researched over the last twenty years. Nevertheless, there are still some misconceptions that are no longer valid:
Decoding computational complexity: Network coding decoders have been improved over the years. Nowadays, the algorithms are highly efficient and parallelizable. In 2016, with Intel Core i5 processors with SIMD instructions enabled, the decoding goodput of network coding was 750 MB/s for a generation size of 16 packets and 250 MB/s for a generation size of 64 packets. Furthermore, today's algorithms can be vastly parallelizable, increasing the encoding and decoding goodput even further.
Transmission Overhead: It is usually thought that the transmission overhead of network coding is high due to the need to append the coding coefficients to each coded packet. In reality, this overhead is negligible in most applications. The overhead due to coding coefficients can be computed as follows. Each packet has appended
M
{\displaystyle M}
coding coefficients. The size of each coefficient is the number of bits needed to represent one element of the Galois field. In practice, most network coding applications use a generation size of no more than 32 packets per generation and Galois fields of 256 elements (binary-8). With these numbers, each packet needs
M
∗
l
o
g
2
(
s
)
=
32
{\displaystyle M*log_{2}(s)=32}
bytes of appended overhead. If each packet is 1500 bytes long (i.e. the Ethernet MTU), then 32 bytes represent an overhead of only 2%.
Overhead due to linear dependencies: Since the coding coefficients are chosen randomly in RLNC, there is a chance that some transmitted coded packets are not beneficial to the destination because they are formed using a linearly dependent combination of packets. However, this overhead is negligible in most applications. The linear dependencies depend on the Galois fields' size and are practically independent of the generation size used. We can illustrate this with the following example. Let us assume we are using a Galois field of
q
{\displaystyle q}
elements and a generation size of
M
{\displaystyle M}
packets. If the destination has not received any coded packet, we say it has
M
{\displaystyle M}
degrees of freedom, and then almost any coded packet will be useful and innovative. In fact, only the zero-packet (only zeroes in the coding coefficients) will be non-innovative. The probability of generating the zero-packet is equal to the probability of each of the
M
{\displaystyle M}
coding coefficient to be equal to the zero-element of the Galois field. I.e., the probability of a non-innovative packet is of
1
q
M
{\displaystyle {\frac {1}{q^{M}}}}
. With each successive innovative transmission, it can be shown that the exponent of the probability of a non innovative packet is reduced by one. When the destination has received
M
−
1
{\displaystyle M-1}
innovative packets (i.e., it needs only one more packet to fully decode the data). Then the probability of a non innovative packet is of
1
q
{\displaystyle {\frac {1}{q}}}
. We can use this knowledge to calculate the expected number of linearly dependent packets per generation. In the worst-case scenario, when the Galois field used contains only two elements (
q
=
2
{\displaystyle q=2}
), the expected number of linearly dependent packets per generation is of 1.6 extra packets. If our generation size if of 32 or 64 packets, this represents an overhead of 5% or 2.5%, respectively. If we use the binary-8 field (
q
=
256
{\displaystyle q=256}
), then the expected number of linearly dependent packets per generation is practically zero. Since it is the last packets the major contributor to the overhead due to linear dependencies, there are RLNC-based protocols such as tunable sparse network coding that exploit this knowledge. These protocols introduce sparsity (zero-elements) in the coding coefficients at the beginning of the transmission to reduce the decoding complexity, and reduce the sparsity at the end of the transmission to reduce the overhead due to linear dependencies.
== Applications ==
Over the years, multiple researchers and companies have integrated network coding solutions into their applications. We can list some of the applications of network coding in different areas:
VoIP: The performance of streaming services such as VoIP over wireless mesh networks can be improved with network coding by reducing the network delay and jitter.
Video and audio streaming and conferencing: The performance of MPEG-4 traffic in terms of delay, packet loss, and jitter over wireless networks prone to packet erasures can be improved with RLNC. In the case of audio streaming over wireless mesh networks, the packet delivery ratio, latency, and jitter performance of the network can be significantly increased when using RLNC instead of packet forwarding-based protocols such as simplified multicast forwarding and partial dominant pruning. The performance improvements of network coding for video conferencing are not only theoretical. In 2016, the authors of built a real-world testbed of 15 wireless Android devices to evaluate the feasibility of network-coding-based video conference systems. Their results showed large improvements in packet delivery ratio and overall user experience, especially over poor quality links compared to multicasting technologies based on packet forwarding.
Software-defined wide area networks (SD-WAN): Large industrial IoT wireless networks can benefit from network coding. Researchers showed that network coding and its channel bundling capabilities improved the performance of SD-WANs with a large number of nodes with multiple cellular connections. Nowadays, companies such as Barracuda are employing RLNC-based solutions due to their advantages in low latency, small footprint on computing devices, and low overhead.
Channel bundling: Due to the statelessness characteristics of RLNC, it can be used to efficiently perform channel bundling, i.e., the transmission of information through multiple network interfaces. Since the coded packets are randomly generated, and the state of the code traverses the network together with the coded packets, a source can achieve bundling without much planning just by sending coded packets through all its network interfaces. The destination can decode the information once enough coded packets arrive, irrespectively of the network interface. A video demonstrating the channel bundling capabilities of RLNC is available at.
5G private networks: RLNC can be integrated into the 5G NR standard to improve the performance of video delivery over 5G systems. In 2018, a demo presented at the Consumer Electronics Show demonstrated a practical deployment of RLNC with NFV and SDN technologies to improve video quality against packet loss due to congestion at the core network.
Remote collaboration.
Augmented reality remote support and training.
Remote vehicle driving applications.
Connected cars networks.
Gaming applications such as low latency streaming and multiplayer connectivity.
Healthcare applications.
Industry 4.0.
Satellite networks.
Agricultural sensor fields.
In-flight entertainment networks.
Major security and firmware updates for mobile product families.
Smart city infrastructure.
Information-centric networking and named data networking.: Linear network coding can improve the network efficiency of information-centric networking solutions by exploiting the multi-source multi-cast nature of such systems. It has been shown, that RLNC can be integrated into distributed content delivery networks such as IPFS to increase data availability while reducing storage resources.
Alternative to forward error correction and automatic repeat requests in traditional and wireless networks with packet loss, such as Coded TCP and Multi-user ARQ
Protection against network attacks such as snooping, eavesdropping, replay, or data corruption.
Digital file distribution and P2P file sharing, e.g. Avalanche filesystem from Microsoft
Distributed storage
Throughput increase in wireless mesh networks, e.g.: COPE, CORE, Coding-aware routing, and B.A.T.M.A.N.
Buffer and delay reduction in spatial sensor networks: Spatial buffer multiplexing
Wireless broadcast: RLNC can reduce the number of packet transmission for a single-hop wireless multicast network, and hence improve network bandwidth
Distributed file sharing
Low-complexity video streaming to mobile device
Device-to-device extensions
== See also ==
Secret sharing protocol
Homomorphic signatures for network coding
Triangular network coding
== References ==
Fragouli, C.; Le Boudec, J. & Widmer, J. "Network coding: An instant primer" in Computer Communication Review, 2006. https://doi.org/10.1145/1111322.1111337
Ali Farzamnia, Sharifah K. Syed-Yusof, Norsheila Fisa "Multicasting Multiple Description Coding Using p-Cycle Network Coding", KSII Transactions on Internet and Information Systems, Vol 7, No 12, 2013. doi:10.3837/tiis.2013.12.009
== External links ==
Network Coding Homepage
A network coding bibliography
Raymond W. Yeung, Information Theory and Network Coding, Springer 2008, http://iest2.ie.cuhk.edu.hk/~whyeung/book2/
Raymond W. Yeung et al., Network Coding Theory, now Publishers, 2005, http://iest2.ie.cuhk.edu.hk/~whyeung/netcode/monograph.html
Christina Fragouli et al., Network Coding: An Instant Primer, ACM SIGCOMM 2006, http://infoscience.epfl.ch/getfile.py?mode=best&recid=58339.
Avalanche Filesystem, http://research.microsoft.com/en-us/projects/avalanche/default.aspx
Random Network Coding, https://web.archive.org/web/20060618083034/http://www.mit.edu/~medard/coding1.htm
Digital Fountain Codes, http://www.icsi.berkeley.edu/~luby/
Coding-Aware Routing, https://web.archive.org/web/20081011124616/http://arena.cse.sc.edu/papers/rocx.secon06.pdf
MIT offers a course: Introduction to Network Coding
Network coding: Networking's next revolution?
Coding-aware protocol design for wireless networks: http://scholarcommons.sc.edu/etd/230/ | Wikipedia/Linear_network_coding |
A controller area network bus (CAN bus) is a vehicle bus standard designed to enable efficient communication primarily between electronic control units (ECUs). Originally developed to reduce the complexity and cost of electrical wiring in automobiles through multiplexing, the CAN bus protocol has since been adopted in various other contexts. This broadcast-based, message-oriented protocol ensures data integrity and prioritization through a process called arbitration, allowing the highest priority device to continue transmitting if multiple devices attempt to send data simultaneously, while others back off. Its reliability is enhanced by differential signaling, which mitigates electrical noise. Common versions of the CAN protocol include CAN 2.0, CAN FD, and CAN XL which vary in their data rate capabilities and maximum data payload sizes.
== History ==
Development of the CAN bus started in 1983 at Robert Bosch GmbH. The protocol was officially released in 1986 at the Society of Automotive Engineers (SAE) conference in Detroit, Michigan. The first CAN controller chips were introduced by Intel in 1987, and shortly thereafter by Philips. Released in 1991, the Mercedes-Benz W140 was the first production vehicle to feature a CAN-based multiplex wiring system.
Bosch published several versions of the CAN specification. The latest is CAN 2.0, published in 1991. This specification has two parts. Part A is for the standard format with an 11-bit identifier, and part B is for the extended format with a 29-bit identifier. A CAN device that uses 11-bit identifiers is commonly called CAN 2.0A, and a CAN device that uses 29-bit identifiers is commonly called CAN 2.0B. These standards are freely available from Bosch along with other specifications and white papers.
In 1993, the International Organization for Standardization (ISO) released CAN standard ISO 11898, which was later restructured into two parts: ISO 11898-1 which covers the data link layer, and ISO 11898-2 which covers the CAN physical layer for high-speed CAN. ISO 11898-3 was released later and covers the CAN physical layer for low-speed, fault-tolerant CAN. The physical layer standards ISO 11898-2 and ISO 11898-3 are not part of the Bosch CAN 2.0 specification.
In 2012, Bosch released CAN FD 1.0, or CAN with Flexible Data-Rate. This specification uses a different frame format that allows a different data length as well as optionally switching to a faster bit rate after the arbitration is decided. CAN FD is compatible with existing CAN 2.0 networks so new CAN FD devices can coexist on the same network with existing CAN devices, using the same CAN 2.0 communication parameters. As of 2018, Bosch was active in extending CAN standards.
The CAN bus is one of five protocols used in the on-board diagnostics (OBD)-II vehicle diagnostics standard. The OBD-II standard has been mandatory for all cars and light trucks sold in the United States since model year 1996. The EOBD standard has been mandatory for all petrol vehicles sold in the European Union since 2001 and all diesel vehicles since 2004.
== Applications ==
Passenger vehicles, motorcycles, trucks, buses (combustion vehicles and electric vehicles)
Agricultural equipment
Electronic equipment for aviation and navigation
Electric generators
Industrial automation and mechanical control
Elevators, escalators
Building automation
Medical instruments and equipment
Pedelecs
Model railways/railroads
Ships and other maritime applications
Lighting control systems
3D printers
Robotics/Automation
Satellites
=== Automotive ===
The modern automobile may have as many as 70 electronic control units (ECUs) for various subsystems. Usually the biggest processor is the engine control unit. Others are used for autonomous driving, advanced driver assistance system (ADAS), transmission, airbags, antilock braking/ABS, cruise control, electric power steering, audio systems, power windows, doors, mirror adjustment, battery and recharging systems for hybrid/electric cars, etc. Some of these form independent subsystems, but communication among others is essential. A subsystem may need to control actuators or receive feedback from sensors. The CAN standard was devised to fill this need. One key advantage is that interconnection between different vehicle systems can allow a wide range of safety, economy and convenience features to be implemented using software alone - functionality which would add cost and complexity if such features were hard wired using traditional automotive electrics. Examples include:
Auto start/stop: Various sensor inputs from around the vehicle (speed sensors, steering angle, air conditioning on/off, engine temperature) are collated via the CAN bus to determine whether the engine can be shut down when stationary for improved fuel economy and emissions.
Electric park brakes: The hill hold functionality takes input from the vehicle's tilt sensor (also used by the burglar alarm) and the road speed sensors (also used by the ABS, engine control and traction control) via the CAN bus to determine if the vehicle is stopped on an incline. Similarly, inputs from seat belt sensors (part of the airbag controls) are fed from the CAN bus to determine if the seat belts are fastened, so that the parking brake will automatically release upon moving off.
Parking assist systems: when the driver engages reverse gear, the transmission control unit can send a signal via the CAN bus to activate both the parking sensor system and the door control module for the passenger side door mirror to tilt downward to show the position of the curb. The CAN bus also takes inputs from the rain sensor to trigger the rear windscreen wiper when reversing.
Auto lane assist/collision avoidance systems: The inputs from the parking sensors are also used by the CAN bus to feed outside proximity data to driver assist systems such as Lane Departure warning, and more recently, these signals travel through the CAN bus to actuate brake by wire in active collision avoidance systems.
Auto brake wiping: Input is taken from the rain sensor (used primarily for the automatic windscreen wipers) via the CAN bus to the ABS module to initiate an imperceptible application of the brakes while driving to clear moisture from the brake rotors. Some high-performance Audi and BMW models incorporate this feature.
Sensors can be placed at the most suitable place, and their data used by several ECUs. For example, outdoor temperature sensors (conventionally placed in the front) can be placed in the outside mirrors, avoiding heating by the engine, and data used by the engine, the climate control, and the driver display.
In recent years, the LIN bus (Local Interconnect Network) standard has been introduced to complement CAN for non-critical subsystems such as air-conditioning and infotainment, where data transmission speed and reliability are less critical.
=== Other ===
The CAN bus protocol has been used on the Shimano DI2 electronic gear shift system for road bicycles since 2009, and is also used by the Ansmann and BionX systems in their direct drive motor.
The CAN bus is also used as a fieldbus in general automation environments, primarily due to the low cost of some CAN controllers and processors.
Manufacturers including NISMO aim to use CAN bus data to recreate real-life racing laps in the videogame Gran Turismo 6 using the game's GPS Data Logger function, which would then allow players to race against real laps.
Johns Hopkins University's Applied Physics Laboratory's Modular Prosthetic Limb (MPL) uses a local CAN bus to facilitate communication between servos and microcontrollers in the prosthetic arm.
Teams in the FIRST Robotics Competition widely use CAN bus to communicate between the roboRIO and other robot control modules.
The CueScript teleprompter range uses CAN bus protocol over coaxial cable, to connect its CSSC – Desktop Scroll Control to the main unit
The CAN bus protocol is widely implemented due to its fault tolerance in electrically noisy environments such as model railroad sensor feedback systems by major commercial Digital Command Control system manufacturers and various open-source digital model railroad control projects.
Shearwater Research have implemented the protocol as DiveCAN to use integrating their dive computers into diving rebreathers from various manufacturers.
== Versions ==
=== CAN 2.0 (Classical CAN) ===
Due to its legacy, CAN 2.0 is the most widely used protocol with a maximum payload size of eight bytes and a typical baud rate of 500 kbit/s. Classical CAN, which includes CAN 2.0A (Standard CAN) and CAN 2.0B (Extended CAN), primarily differs in identifier field lengths: CAN 2.0A uses an 11-bit identifier, while CAN 2.0B employs a 29-bit identifier. The longer identifier in CAN 2.0B allows for a greater number of unique message identifiers, which is beneficial in complex systems with many nodes and data types. However, this increase in unique message identifiers also increases frame length, which in turn reduces the maximum data rate. Additionally, the extended identifier provides finer control over message prioritization due to more available identifier values. This, however, may introduce compatibility issues; CAN 2.0A devices can generally communicate with CAN 2.0B devices, but not vice versa, due to potential errors in handling longer identifiers. High-speed CAN 2.0 supports bit rates from 40 kbit/s to 1 Mbit/s and is the basis for higher-layer protocols. In contrast, low-speed CAN 2.0 supports bit rates from 40 kbit/s to 125 kbit/s and offers fault tolerance by allowing communication to continue despite a fault in one of the two wires, with each node maintaining its own termination.
=== CAN FD ===
CAN FD (Flexible Data-Rate), standardized as ISO 11898-1, was developed by Bosch and released in 2012 to meet the need for increased data transfer in modern high-performance vehicles. It offers variable data rates during the transmission of a single frame, allowing the arbitration phase to occur at a lower data rate for robust communication, while the data payload is transmitted at a higher data rate to improve throughput, which is particularly useful in electrically noisy environments for better noise immunity. CAN FD also introduces a flexible data field size, increasing the maximum size from 8 bytes to 64 bytes. This flexibility allows for more efficient data transmission by reducing the number of frames needed for large data transfers, which is beneficial for applications like high-resolution sensor data or software updates.
CAN FD maintains backward compatibility with CAN 2.0 devices by using the same frame format as CAN 2.0B, with the addition of a new control field to indicate whether the frame is a CAN FD frame or a standard CAN 2.0 frame. This allows CAN FD devices to coexist with CAN 2.0 devices on the same bus, while higher data rates and larger data payloads are available only when communicating with other CAN FD devices.
=== CAN XL ===
CAN XL, specified by CiA 610-1 and standardized as part of ISO11898-1, supports up to 2,048-byte payloads and data rates up to 20 Mbit/s. It bridges the gap between CAN FD and Ethernet (100BASE-T1) while maintaining CAN's collision-resolution benefits. CAN XL controllers can also handle Classical CAN and CAN FD communication, ensuring compatibility in mixed networks. Its large data fields allow for higher layer protocols like IP (Internet Protocol) and the tunneling of Ethernet frames.
== Architecture ==
=== Layers ===
The CAN protocol, like many networking protocols, can be decomposed into the following abstraction layers:
Application layer
Application-specific logic
Object layer
Message filtering (mailboxes)
Message and status handling
Transfer layer
Most of the CAN standard applies to the transfer layer. The transfer layer receives messages from the physical layer and transmits those messages to the object layer. The transfer layer is responsible for bit timing and synchronization, message framing, arbitration, acknowledgment, error detection and signaling, and fault confinement. It performs:
Fault confinement
Error detection
Message validation
Acknowledgement
Arbitration
Message framing
Transfer rate and timing
Information routing
Physical layer
CAN bus (ISO 11898-1:2003) originally specified the link layer protocol with only abstract requirements for the physical layer, e.g., asserting the use of a medium with multiple-access at the bit level through the use of dominant and recessive states. The electrical aspects of the physical layer (voltage, current, number of conductors) were specified in ISO 11898-2:2003, which is now widely accepted. However, the mechanical aspects of the physical layer (connector type and number, colors, labels, pin-outs) have yet to be formally specified. As a result, an automotive ECU will typically have a particular—often custom—connector with various sorts of cables, of which two are the CAN bus lines. Nonetheless, several de facto standards for mechanical implementation have emerged, the most common being the 9-pin D-sub type male connector with the following pin-out:
pin 2: CAN-Low (CAN−)
pin 3: GND (ground)
pin 7: CAN-High (CAN+)
pin 9: CAN V+ (power)
This de facto mechanical standard for CAN could be implemented with the node having both male and female 9-pin D-sub connectors electrically wired to each other in parallel within the node. Bus power is fed to a node's male connector and the bus draws power from the node's female connector. This follows the electrical engineering convention that power sources are terminated at female connectors. Adoption of this standard avoids the need to fabricate custom splitters to connect two sets of bus wires to a single D connector at each node. Such nonstandard (custom) wire harnesses (splitters) that join conductors outside the node reduce bus reliability, eliminate cable interchangeability, reduce compatibility of wiring harnesses, and increase cost.
The absence of a complete physical layer specification (mechanical in addition to electrical) freed the CAN bus specification from the constraints and complexity of physical implementation. However, it left CAN bus implementations open to interoperability issues due to mechanical incompatibility. In order to improve interoperability, many vehicle makers have generated specifications describing a set of allowed CAN transceivers in combination with requirements on the parasitic capacitance on the line. The allowed parasitic capacitance includes both capacitors as well as ESD protection (ESD against ISO 7637-3). In addition to parasitic capacitance, 12V and 24V systems do not have the same requirements in terms of line maximum voltage. Indeed, during jump start events light vehicle lines can go up to 24V while truck systems can go as high as 36V. New solutions are emerging, allowing the same component to be used for CAN as well as CAN FD (see ).
Noise immunity on ISO 11898-2:2003 is achieved by maintaining the differential impedance of the bus at a low level with low-value resistors (120 ohms) at each end of the bus. However, when dormant, a low-impedance bus such as CAN draws more current (and power) than other voltage-based signaling buses. On CAN bus systems, balanced line operation, where current in one signal line is exactly balanced by current in the opposite direction in the other signal provides an independent, stable 0 V reference for the receivers. Best practice determines that CAN bus balanced pair signals be carried in twisted pair wires in a shielded cable to minimize RF emission and reduce interference susceptibility in the already noisy RF environment of an automobile.
ISO 11898-2 provides some immunity to common mode voltage between transmitter and receiver by having a 0 V rail running along the bus to maintain a high degree of voltage association between the nodes. Also, in the de facto mechanical configuration mentioned above, a supply rail is included to distribute power to each of the transceiver nodes. The design provides a common supply for all the transceivers. The actual voltage to be applied by the bus and which nodes apply to it are application-specific and not formally specified. Common practice node design provides each node with transceivers that are optically isolated from their node host and derive a 5 V linearly regulated supply voltage for the transceivers from the universal supply rail provided by the bus. This usually allows operating margin on the supply rail sufficient to allow interoperability across many node types. Typical values of supply voltage on such networks are 7 to 30 V. However, the lack of a formal standard means that system designers are responsible for supply rail compatibility.
ISO 11898-2 describes the electrical implementation formed from a multi-dropped single-ended balanced line configuration with resistor termination at each end of the bus.
In this configuration a dominant state is asserted by one or more transmitters switching the CAN− to supply 0 V and (simultaneously) switching CAN+ to the +5 V bus voltage thereby forming a current path through the resistors that terminate the bus. As such the terminating resistors form an essential component of the signaling system, and are included, not just to limit wave reflection at high frequency.
During a recessive state, the signal lines and resistor(s) remain in a high-impedance state with respect to both rails. Voltages on both CAN+ and CAN− tend (weakly) towards a voltage midway between the rails. A recessive state is present on the bus only when none of the transmitters on the bus is asserting a dominant state.
During a dominant state, the signal lines and resistor(s) move to a low-impedance state with respect to the rails so that current flows through the resistor. CAN+ voltage tends to +5 V and CAN− tends to 0 V.
Irrespective of signal state the signal lines are always in a low-impedance state with respect to one another by virtue of the terminating resistors at the end of the bus.
This signaling strategy differs significantly from other balanced line transmission technologies such as RS-422/3, RS-485, etc. which employ differential line drivers/ receivers and use a signaling system based on the differential mode voltage of the balanced line crossing a notional 0 V. Multiple access on such systems normally relies on the media supporting three states (active high, active low and inactive tri-state) and is dealt with in the time domain. Multiple access on CAN bus is achieved by the electrical logic of the system supporting just two states that are conceptually analogous to a ‘wired AND’ network.
=== Physical organization ===
CAN is a multi-master serial bus standard for connecting electronic control units (ECUs) also known as nodes (automotive electronics is a major application domain). Two or more nodes are required on the CAN bus to communicate. A node may interface to devices from simple digital logic e.g. PLD, via FPGA up to an embedded computer running extensive software. Such a computer may also be a gateway allowing a general-purpose computer (like a laptop) to communicate over a USB or Ethernet port to the devices on a CAN bus.
All nodes are connected to each other through a physically conventional two-wire bus. The wires are a twisted pair with a 120 Ω (nominal) characteristic impedance.
This bus uses differential wired-AND signals. Two signals, CAN high (CANH) and CAN low (CANL) are either driven to a "dominant" state with CANH > CANL, or not driven and pulled by passive resistors to a "recessive" state with CANH ≤ CANL. A 0 data bit encodes a dominant state, while a 1 data bit encodes a recessive state, supporting a wired-AND convention, which gives nodes with lower ID numbers priority on the bus.
ISO 11898-2, also called high-speed CAN (bit speeds up to 1 Mbit/s on CAN, 5 Mbit/s on CAN-FD), uses a linear bus terminated at each end with a 120 Ω resistor.
High-speed CAN signaling drives the CANH wire towards 3.5 V and the CANL wire towards 1.5 V when any device is transmitting a dominant (0), while if no device is transmitting a dominant, the terminating resistors passively return the two wires to the recessive (1) state with a nominal differential voltage of 0 V. (Receivers consider any differential voltage of less than 0.5 V to be recessive.) The dominant differential voltage is a nominal 2 V. The dominant common mode voltage (CANH+CANL)/2 must be within 1.5 to 3.5 V of common, while the recessive common mode voltage must be within ±12 of common.
ISO 11898-3, also called low-speed or fault-tolerant CAN (up to 125 kbit/s), uses a linear bus, star bus or multiple star buses connected by a linear bus and is terminated at each node by a fraction of the overall termination resistance. The overall termination resistance should be close to, but not less than, 100 Ω.
Low-speed fault-tolerant CAN signaling operates similarly to high-speed CAN, but with larger voltage swings. The dominant state is transmitted by driving CANH towards the device power supply voltage (5 V or 3.3 V), and CANL towards 0 V when transmitting a dominant (0), while the termination resistors pull the bus to a recessive state with CANH at 0 V and CANL at 5 V. This allows a simpler receiver that just considers the sign of CANH−CANL. Both wires must be able to handle −27 to +40 V without damage.
=== Electrical properties ===
With both high-speed and low-speed CAN, the speed of the transition is faster when a recessive-to-dominant transition occurs since the CAN wires are being actively driven. The speed of the dominant-to-recessive transition depends primarily on the length of the CAN network and the capacitance of the wire used.
High-speed CAN is usually used in automotive and industrial applications where the bus runs from one end of the environment to the other. Fault-tolerant CAN is often used where groups of nodes need to be connected together.
The specifications require the bus be kept within a minimum and maximum common mode bus voltage but do not define how to keep the bus within this range.
The CAN bus must be terminated. The termination resistors are needed to suppress reflections as well as return the bus to its recessive or idle state.
High-speed CAN uses a 120 Ω resistor at each end of a linear bus. Low-speed CAN uses resistors at each node. Other types of terminations may be used such as the Terminating Bias Circuit defined in ISO11783.
A terminating bias circuit provides power and ground in addition to the CAN signaling on a four-wire cable. This provides automatic electrical bias and termination at each end of each bus segment. An ISO11783 network is designed for hot plug-in and removal of bus segments and ECUs.
=== Nodes ===
Each node requires a
Central processing unit, microprocessor, or host processor
The host processor decides what the received messages mean and what messages it wants to transmit.
Sensors, actuators and control devices can be connected to the host processor.
CAN controller- often an integral part of the microcontroller
Receiving: the CAN controller stores the received serial bits from the bus until an entire message is available, which can then be fetched by the host processor (usually by the CAN controller triggering an interrupt).
Sending: the host processor sends the transmit message(s) to a CAN controller, which transmits the bits serially onto the bus when the bus is free.
Transceiver Defined by ISO 11898-2/3 Medium Access Unit [MAU] standards
Receiving: it converts the data stream from CAN bus levels to levels that the CAN controller uses. It usually has protective circuitry to protect the CAN controller.
Transmitting: it converts the data stream from the CAN controller to CAN bus levels.
Each node is able to send and receive messages, but not simultaneously. A message or Frame consists primarily of the ID (identifier), which represents the priority of the message, and up to eight data bytes. A CRC, acknowledge slot [ACK] and other overhead are also part of the message. The improved CAN FD extends the length of the data section to up to 64 bytes per frame. The message is transmitted serially onto the bus using a non-return-to-zero (NRZ) format and may be received by all nodes.
The devices that are connected by a CAN network are typically sensors, actuators, and other control devices. These devices are connected to the bus through a host processor, a CAN controller, and a CAN transceiver.
== Data transmission and arbitration ==
CAN data transmission uses a lossless bitwise arbitration method of contention resolution. This arbitration method requires all nodes on the CAN network to be synchronized to sample every bit on the CAN network at the same time. This is why some call CAN synchronous. Unfortunately the term synchronous is imprecise since the data is transmitted in an asynchronous format, namely without a clock signal.
The CAN specifications use the terms dominant bits and recessive bits, where dominant is a logical 0 (actively driven to a voltage by the transmitter) and recessive is a logical 1 (passively returned to a voltage by a resistor). The idle state is represented by the recessive level (Logical 1). If one node transmits a dominant bit and another node transmits a recessive bit then there is a collision and the dominant bit wins. This means there is no delay to the higher-priority message, and the node transmitting the lower-priority message automatically attempts to re-transmit six-bit clocks after the end of the dominant message. This makes CAN very suitable as a real-time prioritized communications system.
The exact voltages for a logical 0 or 1 depend on the physical layer used, but the basic principle of CAN requires that each node listen to the data on the CAN network including the transmitting node(s) itself (themselves). If a logical 1 is transmitted by all transmitting nodes at the same time, then a logical 1 is seen by all of the nodes, including both the transmitting node(s) and receiving node(s). If a logical 0 is transmitted by all transmitting node(s) at the same time, then a logical 0 is seen by all nodes. If a logical 0 is being transmitted by one or more nodes, and a logical 1 is being transmitted by one or more nodes, then a logical 0 is seen by all nodes including the node(s) transmitting the logical 1. When a node transmits a logical 1 but sees a logical 0, it realizes that there is a contention and it quits transmitting. By using this process, any node that transmits a logical 1, when another node transmits a logical 0, loses the arbitration and drops out. A node that loses arbitration re-queues its message for later transmission and the CAN frame bit-stream continues without error until only one node is left transmitting. This means that the node that transmits the first 1 loses arbitration. Since the 11 (or 29 for CAN 2.0B) bit identifier is transmitted by all nodes at the start of the CAN frame, the node with the lowest identifier transmits more zeros at the start of the frame, and that is the node that wins the arbitration or has the highest priority.
For example, consider an 11-bit ID CAN network, with two nodes with IDs of 15 (binary representation, 00000001111) and 16 (binary representation, 00000010000). If these two nodes transmit at the same time, each will first transmit the start bit then transmit the first six zeros of their ID with no arbitration decision being made.
When ID bit 4 is transmitted, the node with the ID of 16 transmits a 1 (recessive) for its ID, and the node with the ID of 15 transmits a 0 (dominant) for its ID. When this happens, the node with the ID of 16 knows it transmitted a 1, but sees a 0 and realizes that there is a collision and it lost arbitration. Node 16 stops transmitting which allows the node with ID of 15 to continue its transmission without any loss of data. The node with the lowest ID will always win the arbitration and therefore has the highest priority.
Bit rates up to 1 Mbit/s are possible at network lengths below 40 m. Decreasing the bit rate allows longer network distances (e.g. 500 m at 125 kbit/s). The improved CAN FD standard allows increasing the bit rate after arbitration and can increase the speed of the data section by a factor of up to ten or more of the arbitration bit rate.
=== Bit timing ===
All nodes on the CAN network must operate at the same nominal bit rate, but noise, phase shifts, oscillator tolerance and oscillator drift mean that the actual bit rate might not be the nominal bit rate. Since a separate clock signal is not used, a means of synchronizing the nodes is necessary. Synchronization is important during arbitration since the nodes in arbitration must be able to see both their transmitted data and the other nodes' transmitted data at the same time. Synchronization is also important to ensure that variations in oscillator timing between nodes do not cause errors.
Synchronization starts with a hard synchronization on the first recessive to dominant transition after a period of bus idle (the start bit). Resynchronization occurs on every recessive to dominant transition during the frame. The CAN controller expects the transition to occur at a multiple of the nominal bit time. If the transition does not occur at the exact time the controller expects it, the controller adjusts the nominal bit time accordingly.
The adjustment is accomplished by dividing each bit into a number of time slices called quanta, and assigning some number of quanta to each of the four segments within the bit: synchronization, propagation, phase segment 1 and phase segment 2.
The number of quanta the bit is divided into can vary by controller, and the number of quanta assigned to each segment can be varied depending on bit rate and network conditions.
A transition that occurs before or after it is expected causes the controller to calculate the time difference and lengthen phase segment 1 or shorten phase segment 2 by this time. This effectively adjusts the timing of the receiver to the transmitter to synchronize them. This resynchronization process is done continuously at every recessive to dominant transition to ensure the transmitter and receiver stay in sync. Continuously resynchronizing reduces errors induced by noise, and allows a receiving node that was synchronized to a node that lost arbitration to resynchronize to the node which won arbitration.
=== ID allocation ===
Message IDs must be unique on a single CAN bus, otherwise two nodes would continue transmission beyond the end of the arbitration field (ID) causing an error.
In the early 1990s, the choice of IDs for messages was done simply on the basis of identifying the type of data and the sending node; however, as the ID is also used as the message priority, this led to poor real-time performance. In those scenarios, a low CAN bus use of around 30% was commonly required to ensure that all messages would meet their deadlines. However, if IDs are instead determined based on the deadline of the message, the lower the numerical ID and hence the higher the message priority, then bus use of 70 to 80% can typically be achieved before any message deadlines are missed.
=== Interframe spacing ===
Data frames and remote frames are separated from preceding frames by a bit field called interframe space. Interframe space consists of at least three consecutive recessive (1) bits. Following that, if a dominant bit is detected, it will be regarded as the Start of frame bit of the next frame. Overload frames and error frames are not preceded by an interframe space and multiple overload frames are not separated by an interframe space. Interframe space contains the bit fields intermission and bus idle, and suspend transmission for error passive stations, which have been transmitter of the previous message.
== Frames & message structure ==
=== Frame Types ===
A CAN network can be configured to work with two different message (or frame) formats: the standard or base frame format (described in CAN 2.0 A and CAN 2.0 B), and the extended frame format (described only by CAN 2.0 B). The only difference between the two formats is that the CAN base frame supports a length of 11 bits for the identifier, and the CAN extended frame supports a length of 29 bits for the identifier, made up of the 11-bit identifier (base identifier) and an 18-bit extension (identifier extension). The distinction between CAN base frame format and CAN extended frame format is made by using the IDE bit, which is transmitted as dominant in case of an 11-bit frame, and transmitted as recessive in case of a 29-bit frame. CAN controllers that support extended frame format messages are also able to send and receive messages in CAN base frame format. All frames begin with a start-of-frame (SOF) bit that denotes the start of the frame transmission.
CAN has four frame types:
Data frame: a frame containing node data for transmission
Remote frame: a frame requesting the transmission of a specific identifier
Error frame: a frame transmitted by any node detecting an error
Overload frame: a frame to inject a delay between data or remote frame
==== Data frame ====
The data frame is the only frame for actual data transmission. There are two message formats:
Base frame format: with 11 identifier bits
Extended frame format: with 29 identifier bits
The CAN standard requires that the implementation must accept the base frame format and may accept the extended frame format, but must tolerate the extended frame format.
===== Base frame format =====
The frame format is as follows: The bit values are described for CAN-LO signal.
===== Extended frame format =====
The frame format is as follows on from here in the table below:
The two identifier fields (A & B) combine to form a 29-bit identifier.
==== Remote frame ====
Generally data transmission is performed on an autonomous basis with the data source node (e.g., a sensor) sending out a data frame. It is also possible, however, for a destination node to request the data from the source by sending a remote frame.
There are two differences between a data frame and a remote frame. Firstly the RTR-bit is transmitted as a dominant bit in the data frame and secondly in the remote frame there is no data field. The DLC field indicates the data length of the requested message (not the transmitted one). I.e.,
RTR = 0 ; DOMINANT in data frame
RTR = 1 ; RECESSIVE in remote frame
In the event of a data frame and a remote frame with the same identifier being transmitted at the same time, the data frame wins arbitration due to the dominant RTR bit following the identifier.
==== Error frame ====
The error frame consists of two different fields:
The first field is given by the superposition of ERROR FLAGS (6–12 dominant/recessive bits) contributed from different stations.
The following second field is the ERROR DELIMITER (8 recessive bits).
There are two types of error flags:
Active Error Flag
six dominant bits – Transmitted by a node detecting an error on the network that is in error state error active.
Passive Error Flag
six recessive bits – Transmitted by a node detecting an active error frame on the network that is in error state error passive.
There are two error counters in CAN:
Transmit error counter (TEC)
Receive error counter (REC)
When TEC or REC is greater than 127 and less than 255, a Passive Error frame will be transmitted on the bus.
When TEC and REC is less than 128, an Active Error frame will be transmitted on the bus.
When TEC is greater than 255, then the node enters into Bus Off state, where no frames will be transmitted.
==== Overload frame ====
The overload frame contains the two bit fields: Overload Flag and Overload Delimiter. There are two kinds of overload conditions that can lead to the transmission of an overload flag:
The internal conditions of a receiver, which requires a delay of the next data frame or remote frame.
Detection of a dominant bit during intermission.
The start of an overload frame due to case 1 is only allowed to be started at the first bit time of an expected intermission, whereas overload frames due to case 2 start one bit after detecting the dominant bit. Overload Flag consists of six dominant bits. The overall form corresponds to that of the active error flag. The overload flag's form destroys the fixed form of the intermission field. As a consequence, all other stations also detect an overload condition and on their part start transmission of an overload flag. Overload Delimiter consists of eight recessive bits. The overload delimiter is of the same form as the error delimiter.
=== ACK slot ===
The acknowledge slot is used to acknowledge the receipt of a valid CAN frame. Each node that receives the frame, without finding an error, transmits a dominant level in the ACK slot and thus overrides the recessive level of the transmitter. If a transmitter detects a recessive level in the ACK slot, it knows that no receiver found a valid frame. A receiving node may transmit a recessive to indicate that it did not receive a valid frame, but another node that did receive a valid frame may override this with a dominant. The transmitting node cannot know that the message has been received by all of the nodes on the CAN network.
Often, the mode of operation of the device is to re-transmit unacknowledged frames over and over. This may lead to eventually entering the error passive state.
=== Bit stuffing ===
To ensure enough transitions to maintain synchronization, a bit of opposite polarity is inserted after five consecutive bits of the same polarity. This practice is called bit stuffing, and is necessary due to the non-return-to-zero (NRZ) coding used with CAN. The stuffed data frames are destuffed by the receiver.
All fields in the frame are stuffed with the exception of the CRC delimiter, ACK field and end of frame which are a fixed size and are not stuffed. In the fields where bit stuffing is used, six consecutive bits of the same polarity (111111 or 000000) are considered an error. An active error flag can be transmitted by a node when an error has been detected. The active error flag consists of six consecutive dominant bits and violates the rule of bit stuffing.
Bit stuffing means that data frames may be larger than one would expect by simply enumerating the bits shown in the tables above. The maximum increase in size of a CAN frame (base format) after bit stuffing is in the case
11111000011110000...
which is stuffed as (stuffing bits in bold):
111110000011111000001...
The stuffing bit itself may be the first of the five consecutive identical bits, so in the worst case there is one stuffing bit per four original bits.
The size of a base frame is bounded by
8
n
+
44
+
⌊
34
+
8
n
−
1
4
⌋
{\displaystyle 8n+44+\left\lfloor {\frac {34+8n-1}{4}}\right\rfloor }
where n is the number of data bytes, a maximum of 8.
Since
8
n
+
44
{\displaystyle 8n+44}
is the size of the frame before stuffing, in the worst case one bit will be added every four original bits after the first one (hence the −1 at the numerator) and, because of the layout of the bits of the header, only 34 out of 44 of them can be subject to bit stuffing.
An undesirable side effect of the bit stuffing scheme is that a small number of bit errors in a received message may corrupt the destuffing process, causing a larger number of errors to propagate through the destuffed message. This reduces the level of protection that would otherwise be offered by the CRC against the original errors. This deficiency of the protocol has been addressed in CAN FD frames by the use of a combination of fixed stuff bits and a counter that records the number of stuff bits inserted.
== Standardization and protocols ==
=== CAN lower-layer standards ===
ISO 11898 series specifies physical and data link layer (levels 1 and 2 of the ISO/OSI model) of serial communication category called controller area network that supports distributed real-time control and multiplexing for use within road vehicles.
There are several CAN physical layer and other standards:
ISO 11898-1:2015 specifies the data link layer (DLL) and physical signalling of the controller area network (CAN). This document describes the general architecture of CAN in terms of hierarchical layers according to the ISO reference model for open systems interconnection (OSI) established in ISO/IEC 7498-1 and provides the characteristics for setting up an interchange of digital information between modules implementing the CAN DLL with detailed specification of the logical link control (LLC) sublayer and medium access control (MAC) sublayer.
ISO 11898-2:2016 specifies the high-speed (transmission rates of up to 1 Mbit/s) medium access unit (MAU), and some medium-dependent interface (MDI) features (according to ISO 8802-3), which comprise the physical layer of the controller area network. ISO 11898-2 uses a two-wire balanced signaling scheme. It is the most used physical layer in vehicle powertrain applications and industrial control networks.
ISO 11898-3:2006 specifies low-speed, fault-tolerant, medium-dependent interface for setting up an interchange of digital information between electronic control units of road vehicles equipped with the CAN at transmission rates above 40 kbit/s up to 125 kbit/s.
ISO 11898-4:2004 specifies time-triggered communication in the CAN (TTCAN). It is applicable to setting up a time-triggered interchange of digital information between electronic control units (ECU) of road vehicles equipped with CAN, and specifies the frame synchronization entity that coordinates the operation of both logical link and media access controls in accordance with ISO 11898-1, to provide the time-triggered communication schedule.
ISO 11898-5:2007 specifies the CAN physical layer for transmission rates up to 1 Mbit/s for use within road vehicles. It describes the medium access unit functions as well as some medium-dependent interface features according to ISO 8802-2. This represents an extension of ISO 11898-2, dealing with new functionality for systems requiring low-power consumption features while there is no active bus communication.
ISO 11898-6:2013 specifies the CAN physical layer for transmission rates up to 1 Mbit/s for use within road vehicles. It describes the medium access unit functions as well as some medium-dependent interface features according to ISO 8802-2. This represents an extension of ISO 11898-2 and ISO 11898-5, specifying a selective wake-up mechanism using configurable CAN frames.
ISO 16845-1:2016 provides the methodology and abstract test suite necessary for checking the conformance of any CAN implementation of the CAN specified in ISO 11898-1.
ISO 16845-2:2018 establishes test cases and test requirements to realize a test plan verifying if the CAN transceiver with implemented selective wake-up functions conform to the specified functionalities. The kind of testing defined in ISO 16845-2:2018 is named as conformance testing.
=== CAN-based higher-layer protocols ===
As the CAN standard does not include common communication features, such as flow control, device addressing, and transportation of data blocks larger than one message, and above all, application data, many implementations of higher layer protocols were created. Several are standardized for a business area, although all can be extended by each manufacturer. For passenger cars, each manufacturer has its own standard.
CAN in Automation (CiA) is the international users' and manufacturers' organization that develops and supports CAN-based higher-layer protocols and their international standardization. Among these specifications are:
==== List of standardized approaches ====
ARINC 812 or ARINC 825 (aviation industry)
CANopen - CiA 301/302-2 and EN 50325-4 (industrial automation)
IEC 61375-3-3 (use of CANopen in rail vehicles)
DeviceNet (industrial automation)
EnergyBus - CiA 454 and IEC 61851-3 (battery–charger communication)
ISOBUS - ISO 11783 (agriculture)
ISO-TP - ISO 15765-2 (transport protocol for automotive diagnostics)
MilCAN (military vehicles)
NMEA 2000 - IEC 61162-3 (marine industry)
SAE J1939 (in-vehicle network for buses and trucks)
SAE J2284 (in-vehicle networks for passenger cars)
Unified Diagnostic Services (UDS) - ISO 14229 (automotive diagnostics)
LeisureCAN - open standard for the leisure craft/vehicle industry
==== List of other approaches ====
CANaerospace - Stock (for the aviation industry)
CAN Kingdom - Kvaser (embedded control system)
CCP/XCP (automotive ECU calibration)
GMLAN - General Motors (for General Motors)
RV-C - RVIA (used for recreational vehicles)
SafetyBUS p - Pilz (used for industrial automation)
UAVCAN (aerospace and robotics)
CSP (CubeSat Space Protocol)
VSCP (Very Simple Control Protocol) a free automation protocol suitable for all sorts of automation tasks
==== CANopen Lift ====
The CANopen Special Interest Group (SIG) "Lift Control", which was founded in 2001, develops the CANopen application profile CiA 417 for lift control systems. It works on extending the features, improves technical content and ensures that the current legal standards for lift control systems are met. The first version of CiA 417 was published (available for CiA members) in summer 2003, version 2.0 in February 2010, version 2.1.0 in July 2012, version 2.2.0 in December 2015, and version 2.3.1 in February 2020.
Jörg Hellmich (ELFIN GmbH) is the chairman of this SIG and manages a wiki of the CANopen lift community with content about CANopen lift.
=== DBC (CAN Database Files) ===
CAN DBC files are standardized ASCII files used to define messages sent over a CAN bus. They define the format and purpose of each type of message, including the message IDs, signal names, scaling, offsets, and data types, and provide an interoperable aid to developing CAN bus applications.
== Security ==
=== Technical vulnerabilities ===
The CAN protocol does not include encryption, authentication, or access control mechanisms, leaving it susceptible to multiple attack vectors:
Message Injection: Attackers can introduce malicious messages into the network, potentially affecting vehicle operations.
Replay Attacks: Since CAN messages lack timestamps or unique identifiers, previously recorded messages can be resent to manipulate system behavior.
Eavesdropping: The broadcast nature of CAN allows any node to receive and interpret messages, enabling unauthorized data collection.
Denial-of-Service (DoS) Attacks: An attacker can flood the bus with high-priority messages, preventing legitimate communication.
=== Real-world exploits ===
Several high-profile incidents have demonstrated the security weaknesses of CAN:
2015 Jeep Cherokee Hack: Researchers Charlie Miller and Chris Valasek exploited a vulnerability in the vehicle’s telematics unit, gaining remote control over steering, braking, and acceleration. This research led to a recall affecting 1.4 million vehicles.
Phreaked Out Demonstration: In a publicized test, security researcher Mathew Solnik used off-the-shelf hardware and a GSM-based wireless system to send commands to a vehicle's CAN bus, illustrating the ease of unauthorized remote access.
CAN Injection Vehicle Thefts: Attackers have used CAN injection techniques to steal push-to-start vehicles by accessing the CAN bus through exposed wiring, such as headlights or diagnostic ports, allowing them to spoof key fob signals and start the engine.
=== Higher-layer security measures ===
By deploying these higher-layer security measures, designers can substantially enhance the resilience of CAN-based networks in vehicles and industrial systems. Here are some common solutions:
Hardware Security Modules (HSMs) and Secure Elements: Modern ECUs increasingly integrate HSMs to securely store cryptographic keys and perform digital signing. This ensures message authenticity and integrity without exposing sensitive information.
Message Authentication and Integrity: Lightweight cryptographic techniques, including message authentication codes (MACs) and digital signatures, are being used to verify that messages originate from trusted sources. Although full encryption on CAN is challenging due to its real-time constraints, these measures help prevent unauthorized message injection.
Lightweight Encryption: Ongoing research is exploring low-overhead encryption schemes that protect sensitive data on the CAN bus while preserving bandwidth and real-time performance.
Intrusion Detection Systems (IDS): Advanced IDS and anomaly detection algorithms—often incorporating machine learning—monitor CAN traffic for unusual patterns or replay attacks, providing early warning of potential security breaches.
Standardization and Cybersecurity Guidelines: Efforts such as SAE J3061 and ISO/SAE 21434 offer guidelines for integrating security into automotive networks, helping to standardize best practices for mitigating vulnerabilities in CAN systems.
=== Applying Zero-Trust Architecture (ZTA) to Automotive Security ===
Zero-Trust Architecture (ZTA), based on the principle of "never trust, always verify," is being adapted from enterprise networks to automotive cybersecurity. By enforcing strict authentication, segmentation, and monitoring, ZTA enhances vehicle network resilience against cyber threats while balancing performance, cost, and system complexity.
Key Components of Automotive ZTA
Secure Onboard Communication (SecOC): Ensures authentication and verification of network communication between Electronic Control Units (ECUs) using cryptographic methods to prevent spoofing attacks.
ECU Authentication and Key Management: Enforces strict identity verification for each ECU before allowing communication within the vehicle network, utilizing cryptographic key creation and distribution.
Network Segmentation and Policy Enforcement: The vehicle gateway ECU acts as a policy enforcement point to regulate data flow between subsystems and limit lateral movement of attackers.
Secure Boot and Firmware Integrity: Ensures that ECUs only run authentic software by validating firmware signatures at startup, preventing unauthorized code execution.
Intrusion Detection and Monitoring: Implements real-time monitoring and AI-driven analytics to detect anomalies in CAN traffic, identifying cybersecurity threats early.
While ZTA enhances vehicle security, implementing efficient cryptographic methods and integrating with complex automotive systems remain challenges. Research suggests ZTA provides strong security with minimal impact on performance and cost.
== Development tools ==
=== Understanding CAN Bus Tools and Microcontrollers ===
When developing or troubleshooting a CAN bus system, examining hardware signals is crucial. Tools like logic analyzers and bus analyzers capture, decode, and store signals, enabling users to view high-speed waveforms for detailed analysis. In addition to these, CAN bus monitors are specialized tools that combines hardware and software to listen to and display CAN traffic in a user interface. It often includes the ability to simulate CAN bus activity by sending CAN frames to the bus. This feature is useful for validating expected CAN traffic or testing the reaction of a device to simulated traffic.
When selecting a development tool or microcontroller for working with the CAN bus, it's important to understand the distinction between CAN controllers integrated into microcontrollers and CAN transceivers added externally on circuit board:
CAN Controller (Integrated into Microcontroller): Refers to the built-in peripheral within a microcontroller or processor that manages CAN protocol functions, including message framing, identifier filtering, error detection, and buffering. Typically, this internal controller requires an external CAN transceiver to physically connect to the CAN bus.
CAN Transceiver (Independent IC, separate from processor): Refers to a dedicated hardware component found on a development board or system that converts logic-level signals from the microcontroller’s CAN controller into differential voltage physical-layer signals.
=== CAN bit-banging ===
When working with CAN communication, CAN transceivers are typically used to handle the physical layer and some aspects of the data link layer. However, they do not give you full control over the data link layer itself. The transceiver automatically handles the framing, timing, and other elements of communication, which can be limiting if you need to manipulate the CAN protocol at a finer level or perform custom tasks that require low-level control. For example, when using a transceiver, you cannot easily modify how data frames are structured or manipulate certain aspects of the protocol without additional hardware or complex configurations.
CAN bit-banging offers a solution to this limitation by providing direct control over the data link layer. In this approach, you use general-purpose I/O pins on a microcontroller to manually implement the CAN signal protocol. This gives you the ability to customize and adjust the framing, timing, and message handling as needed, which can be particularly useful in low-level debugging, implementing specific CAN features, or experimenting with the protocol.
While bit-banging allows for greater control, it comes with trade-offs. It is slower and less efficient than using a dedicated CAN controller and transceiver, as the timing and transmission are all managed in software. Still, if fine-grained control over the communication process is required, bit-banging is a powerful option.
An open-source solution to facilitate CAN bit-banging is the CANT GitHub Repository . This library provides a software implementation of the CAN protocol, enabling developers to implement CAN communication while having complete control over the data link layer, even on microcontrollers that lack native CAN hardware support.
=== List of development tools ===
== Licensing ==
Bosch holds patents on the technology, though those related to the original protocol have now expired. Manufacturers of CAN-compatible microprocessors pay license fees to Bosch for use of the CAN trademark and any of the newer patents related to CAN FD, and these are normally passed on to the customer in the price of the chip. Manufacturers of products with custom ASICs or FPGAs containing CAN-compatible modules need to pay a fee for the CAN Protocol License if they wish to use the CAN trademark or CAN FD capabilities.
== See also ==
CANopen – Computer network protocol
Automotive EtherLoop – Telecommunications hybrid technologyPages displaying short descriptions of redirect targets
FlexRay – Computer network protocol
List of network buses – List of single collision domain electronic communication bus systems
Modbus – Serial communications protocol
MOST bus – High-speed multimedia network technology used in the automotive industryPages displaying short descriptions of redirect targets
== References ==
== External links ==
Specifications
ISO 11898-1 Standard (2024)
Bosch CAN Specification Version 2.0 (1991, 1997) - also known as Classical CAN and CAN-Classic
Bosch CAN-FD Specification Version 1.0 (2012) - increase data rates up to 8 Mbit/s
Other
Controller Area Network (CAN) Schedulability Analysis: Refuted, Revisited and Revised
A webpage about CAN in automotive
Controller Area Network (CAN) Schedulability Analysis with FIFO Queues
Controller Area Network (CAN) Implementation Guide Archived 2012-12-10 at the Wayback Machine
Free e-learning module "Introduction to CAN"
ARINC-825 Tutorial (video) from Excalibur Systems Inc.
Website of CiA
CAN Newsletter Online
Understanding and Using the Controller Area Network from UC Berkeley
CAN Protocol Tutorial
ESD protection for CAN bus and CAN FD | Wikipedia/Controller_Area_Network |
A special function register (SFR) is a register within a microcontroller that controls or monitors various aspects of the microcontroller's function. Depending on the processor architecture, this can include, but is not limited to:
I/O and peripheral control (such as serial ports or general-purpose IOs)
timers
stack pointer
stack limit (to prevent overflows)
program counter
subroutine return address
processor status (servicing an interrupt, running in protected mode, etc.)
condition codes (result of previous comparisons)
Because special registers are closely tied to some special function or status of the microcontroller, they might not be directly writeable by normal instructions (such as adds, moves, etc.). Instead, some special registers in some microcontroller architectures require special instructions to modify them. For example, the program counter is not directly writeable in many microcontroller architectures. Instead, the programmer uses instructions such as return from subroutine, jump, or branch to modify the program counter. For another example, the condition code register might not be directly writable, instead being updated only by compare instructions.
== Intel microcontrollers ==
Special function registers are in the upper area of addressable memory, from address 0x80 to 0xFF. This area of memory cannot be used for data or program storage, but is instead a series of memory-mapped ports and registers. All port input and output can therefore be performed by memory move operations on specified addresses in the SFR region. Also, different status registers are mapped into the SFR, for use in checking the status of the 8051, and changing some operational parameters of the 8051.
Some SFR bits may be set directly using SETB/LDB instructions on the SFR's address, whereas others may require usage of specific instructions. The Intel 80196 class microcontroller has 24 SFRs, each 1 byte in size; standard Intel 8051 chips have 21 SFRs.
== External links ==
i8051 SFRs
SPECIAL FUNCTION REGISTERS 1/2 at the Wayback Machine (archived 2014-01-29)
SFRs in C programming for AVR | Wikipedia/Special_function_register |
Four-Phase Systems, Inc., was a computer company, founded by Lee Boysel and others, which built one of the earliest computers using semiconductor main memory and MOS LSI logic. The company was incorporated in February 1969 and had moderate commercial success. It was acquired by Motorola in 1982.
== History ==
The idea behind Four-Phase Systems began when Boysel was designing MOS components at Fairchild Semiconductor in 1967. Boysel wrote a manifesto explaining how a computer could be built from a small number of MOS chips. Fairchild made Boysel head of a MOS design group, which he used to design parts satisfying the requirements of his putative computer. After doing this, Boysel left to start Four-Phase in October 1968, initially with two other engineers from his Fairchild group as well as others. Boysel was not sued by Fairchild, perhaps because of chaos caused by a change in Fairchild management at that time. When the company was incorporated in February 1969, he was joined by other engineers from the Fairchild group. Robert Noyce, co-founder of Intel, was an early board member.
Boysel arranged for chips to be fabricated by Cartesian, a wafer-processing company founded by another engineer from Fairchild. By spring of 1970, Four-Phase had an engineering-level system operating. Four-Phase showed its system at the Fall Joint Computer Conference in 1970. By June 1971, Four-Phase IV/70 computers were in use at four different customers, and by March 1973, they had shipped 347 systems to 131 customers. The company enjoyed a substantial level of success, having revenues of $178 million by 1979. As of 1979, their models included:
The IV/30 and IV/55 were intended for only one or two data entry/display stations, while the IV/40 and higher were intended for multiple high-volume data entry stations and independent data processing, and the IV/60 and higher could be made into small computer systems.
In 1982, Four-Phase was sold to Motorola for a $253 million stock exchange (equivalent to $824 million today). The former location of the business on N De Anza Blvd is now Apple's Infinite Loop campus.
== System ==
The Four-Phase CPU used a 24-bit word size. It fit on a single card and was composed of three AL1 chips, three read-only memory (ROM) chips, and three random logic chips. A memory card used Four-Phase's 1K random-access memory (RAM) chips. The system also included a built-in video controller which could drive up to 32 terminals from a character buffer.
=== AL1 chip ===
The AL1 is an 8-bit bit slice which contains eight registers and an arithmetic logic unit (ALU). It was implemented using four-phase logic and used over a thousand gates, with an area of 130 by 120 mils (3.3 mm by 3 mm). The chip was described in an April 1970 article in Computer Design magazine. Although the AL1 was not called a microprocessor, or used as one at the time, it was later dubbed one in connection with litigation in the 1990s, when Texas Instruments claimed to have patented the microprocessor. In response, Boysel assembled a system in which a single 8-bit AL1 was used as part of a courtroom demonstration computer system, together with ROM, RAM and an input-output device, where the ROM and its associated latch acted like a microcode controller to provide control lines for memory read/write, selecting an ALU operation, and providing the address of the next microcode instruction. The AL1 and its chipset is arguably the first microprocessor used in a commercial product (vs the Intel 4004, the first commercially available microprocessor).
== References ==
Boysel, Lee. "Making Your First Million (and other tips for aspiring entrepreneurs)" (QuickTime). University of Michigan ECE-Invited Lectures.
Lee Boysel – Making Your First Million And Other Tips for Aspiring Entrepreneurs
== External links ==
Four-Phase Systems AL1 Processor – 8-bits by Lee Boysel | Wikipedia/Four-Phase_Systems_AL1 |
A wireless network is a computer network that uses wireless data connections between network nodes. Wireless networking allows homes, telecommunications networks, and business installations to avoid the costly process of introducing cables into a building, or as a connection between various equipment locations. Admin telecommunications networks are generally implemented and administered using radio communication. This implementation takes place at the physical level (layer) of the OSI model network structure.
Examples of wireless networks include cell phone networks, wireless local area networks (WLANs), wireless sensor networks, satellite communication networks, and terrestrial microwave networks.
== History ==
=== Wireless networks ===
The first professional wireless network was developed under the brand ALOHAnet in 1969 at the University of Hawaii and became operational in June 1971. The first commercial wireless network was the WaveLAN product family, developed by NCR in 1986.
1973 – Ethernet 802.3
1991 – 2G cell phone network
June 1997 – 802.11 "Wi-Fi" protocol first release
1999 – 803.11 VoIP integration
=== Underlying technology ===
Advances in MOSFET (MOS transistor) wireless technology enabled the development of digital wireless networks. The wide adoption of RF CMOS (radio frequency CMOS), power MOSFET and LDMOS (lateral diffused MOS) devices led to the development and proliferation of digital wireless networks by the 1990s, with further advances in MOSFET technology leading to increasing bandwidth in the 2000s (Edholm's law). Most of the essential elements of wireless networks are built from MOSFETs, including the mobile transceivers, base station modules, routers, RF power amplifiers, telecommunication circuits, RF circuits, and radio transceivers, in networks such as 2G, 3G, and 4G.
== Wireless links ==
Terrestrial microwave – Terrestrial microwave communication uses Earth-based transmitters and receivers resembling satellite dishes. Terrestrial microwaves are in the low gigahertz range, which limits all communications to line-of-sight. Relay stations are spaced approximately 48 km (30 mi) apart.
Communications satellites – Satellites communicate via microwave radio waves, which are not deflected by the Earth's atmosphere. The satellites are stationed in space, typically in geosynchronous orbit 35,400 km (22,000 mi) above the equator. These Earth-orbiting systems are capable of receiving and relaying voice, data, and TV signals.
Cellular and PCS systems use several radio communications technologies. The systems divide the region covered into multiple geographic areas. Each area has a low-power transmitter or radio relay antenna device to relay calls from one area to the next area.
Radio and spread spectrum technologies – Wireless local area networks use a high-frequency radio technology similar to digital cellular and a low-frequency radio technology. Wireless LANs use spread spectrum technology to enable communication between multiple devices in a limited area. IEEE 802.11 defines a common flavor of open-standards wireless radio-wave technology known as Wi-Fi.
Free-space optical communication uses visible or invisible light for communications. In most cases, line-of-sight propagation is used, which limits the physical positioning of communicating devices.
== Types of wireless networks ==
=== Wireless PAN ===
Wireless personal area networks (WPANs) connect devices within a relatively small area, that is generally within a person's reach. For example, both Bluetooth radio and invisible infrared light provides a WPAN for interconnecting a headset to a laptop. Zigbee also supports WPAN applications. Wi-Fi PANs are becoming commonplace (2010) as equipment designers start to integrate Wi-Fi into a variety of consumer electronic devices. Intel "My WiFi" and Windows 7 "virtual Wi-Fi" capabilities have made Wi-Fi PANs simpler and easier to set up and configure.
=== Wireless LAN ===
A wireless local area network (WLAN) links two or more devices over a short distance using a wireless distribution method, usually providing a connection through an access point for internet access. The use of spread-spectrum or OFDM technologies may allow users to move around within a local coverage area, and still remain connected to the network.
Products using the IEEE 802.11 WLAN standards are marketed under the Wi-Fi brand name.
Fixed wireless technology implements point-to-point links between computers or networks at two distant locations, often using dedicated microwave or modulated laser light beams over line of sight paths. It is often used in cities to connect networks in two or more buildings without installing a wired link.
To connect to Wi-Fi using a mobile device, one can use a device like a wireless router or the private hotspot capability of another mobile device.
=== Wireless ad hoc network ===
A wireless ad hoc network, also known as a wireless mesh network or mobile ad hoc network (MANET), is a wireless network made up of radio nodes organized in a mesh topology. Each node forwards messages on behalf of the other nodes and each node performs routing. Ad hoc networks can "self-heal", automatically re-routing around a node that has lost power. Various network layer protocols are needed to realize ad hoc mobile networks, such as Distance Sequenced Distance Vector routing, Associativity-Based Routing, Ad hoc on-demand distance-vector routing, and Dynamic Source Routing.
=== Wireless MAN ===
Wireless metropolitan area networks are a type of wireless network that connects several wireless LANs.
WiMAX is a type of Wireless MAN and is described by the IEEE 802.16 standard.
=== Wireless WAN ===
Wireless wide area networks are wireless networks that typically cover large areas, such as between neighboring towns and cities, or city and suburb. These networks can be used to connect branch offices of business or as a public Internet access system. The wireless connections between access points are usually point to point microwave links using parabolic dishes on the 2.4 GHz and 5.8 GHz band, rather than omnidirectional antennas used with smaller networks. A typical system contains base station gateways, access points and wireless bridging relays. Other configurations are mesh systems where each access point acts as a relay also. When combined with renewable energy systems such as photovoltaic solar panels or wind systems they can be stand-alone systems.
=== Cellular network ===
A cellular network or mobile network is a radio network distributed over land areas called cells, each served by at least one fixed-location transceiver, known as a cell site or base station. In a cellular network, each cell characteristically uses a different set of radio frequencies from all their immediate neighbouring cells to avoid any interference.
When joined these cells provide radio coverage over a wide geographic area. This enables a large number of portable transceivers (e.g., mobile phones, pagers, etc.) to communicate with each other and with fixed transceivers and telephones anywhere in the network, via base stations, even if some of the transceivers are moving through more than one cell during transmission.
Although originally intended for cell phones, with the development of smartphones, cellular telephone networks routinely carry data in addition to telephone conversations:
Global System for Mobile Communications (GSM): The GSM network is divided into three major systems: the switching system, the base station system, and the operation and support system. The cell phone connects to the base system station which then connects to the operation and support station; it then connects to the switching station where the call is transferred to where it needs to go. GSM is the most common standard and is used for a majority of cell phones.
Personal Communications Service (PCS): PCS is a radio band that can be used by mobile phones in North America and South Asia. Sprint happened to be the first service to set up a PCS.
D-AMPS: Digital Advanced Mobile Phone Service, an upgraded version of AMPS, is being phased out due to advancements in technology. The newer GSM networks are replacing the older system.
==== Private LTE/5G networks ====
Private LTE/5G networks use licensed, shared or unlicensed wireless spectrum thanks to LTE or 5G cellular network base stations, small cells and other radio access network (RAN) infrastructure to transmit voice and data to edge devices (smartphones, embedded modules, routers and gateways.
3GPP defines 5G private networks as non-public networks that typically employ a smaller-scale deployment to meet an organization's needs for reliability, accessibility, and maintainability.
==== Open Source ====
Open source private networks are based on a collaborative, community-driven software that relies on peer review and production to use, modify and share the source code.
=== Global area network ===
A global area network (GAN) is a network used for supporting mobile across an arbitrary number of wireless LANs, satellite coverage areas, etc. The key challenge in mobile communications is handing off user communications from one local coverage area to the next. In IEEE Project 802, this involves a succession of terrestrial wireless LANs.
=== Space network ===
Space networks are networks used for communication between spacecraft, usually in the vicinity of the Earth. The example of this is NASA's Space Network.
== Uses ==
Some examples of usage include cellular phones which are part of everyday wireless networks, allowing easy personal communications. Another example, Intercontinental network systems, use radio satellites to communicate across the world. Emergency services such as the police utilize wireless networks to communicate effectively as well. Individuals and businesses use wireless networks to send and share data rapidly, whether it be in a small office building or across the world.
== Properties ==
=== General ===
In a general sense, wireless networks offer a vast variety of uses by both business and home users.
"Now, the industry accepts a handful of different wireless technologies. Each wireless technology is defined by a standard that describes unique functions at both the Physical and the Data Link layers of the OSI model. These standards differ in their specified signaling methods, geographic ranges, and frequency usages, among other things. Such differences can make certain technologies better suited to home networks and others better suited to network larger organizations."
=== Performance ===
Each standard varies in geographical range, thus making one standard more ideal than the next depending on what it is one is trying to accomplish with a wireless network.
The performance of wireless networks satisfies a variety of applications such as voice and video. The use of this technology also gives room for expansions, such as from 2G to 3G and, 4G and 5G technologies, which stand for the fourth and fifth generation of cell phone mobile communications standards. As wireless networking has become commonplace, sophistication increases through configuration of network hardware and software, and greater capacity to send and receive larger amounts of data, faster, is achieved. Now the wireless network has been running on LTE, which is a 4G mobile communication standard. Users of an LTE network should have data speeds that are 10x faster than a 3G network.
=== Space ===
Space is another characteristic of wireless networking. Wireless networks offer many advantages when it comes to difficult-to-wire areas trying to communicate such as across a street or river, a warehouse on the other side of the premises or buildings that are physically separated but operate as one. Wireless networks allow for users to designate a certain space which the network will be able to communicate with other devices through that network.
Space is also created in homes as a result of eliminating clutters of wiring. This technology allows for an alternative to installing physical network mediums such as TPs, coaxes, or fiber-optics, which can also be expensive.
=== Home ===
For homeowners, wireless technology is an effective option compared to Ethernet for sharing printers, scanners, and high-speed Internet connections. WLANs help save the cost of installation of cable mediums, save time from physical installation, and also creates mobility for devices connected to the network.
Wireless networks are simple and require as few as one single wireless access point connected directly to the Internet via a router.
=== Wireless network elements ===
The telecommunications network at the physical layer also consists of many interconnected wireline network elements (NEs). These NEs can be stand-alone systems or products that are either supplied by a single manufacturer or are assembled by the service provider (user) or system integrator with parts from several different manufacturers.
Wireless NEs are the products and devices used by a wireless carrier to provide support for the backhaul network as well as a mobile switching center (MSC).
Reliable wireless service depends on the network elements at the physical layer to be protected against all operational environments and applications (see GR-3171, Generic Requirements for Network Elements Used in Wireless Networks – Physical Layer Criteria).
What are especially important are the NEs that are located on the cell tower to the base station (BS) cabinet. The attachment hardware and the positioning of the antenna and associated closures and cables are required to have adequate strength, robustness, corrosion resistance, and resistance against wind, storms, icing, and other weather conditions. Requirements for individual components, such as hardware, cables, connectors, and closures, shall take into consideration the structure to which they are attached.
=== Difficulties ===
==== Interference ====
Compared to wired systems, wireless networks are frequently subject to electromagnetic interference. This can be caused by other networks or other types of equipment that generate radio waves that are within, or close, to the radio bands used for communication. Interference can degrade the signal or cause the system to fail.
==== Absorption and reflection ====
Some materials cause absorption of electromagnetic waves, preventing it from reaching the receiver, in other cases, particularly with metallic or conductive materials reflection occurs. This can cause dead zones where no reception is available. Aluminium foiled thermal isolation in modern homes can easily reduce indoor mobile signals by 10 dB frequently leading to complaints about the bad reception of long-distance rural cell signals.
==== Multipath fading ====
In multipath fading two or more different routes taken by the signal, due to reflections, can cause the signal to cancel out each other at certain locations, and to be stronger in other places (upfade).
==== Hidden node problem ====
The hidden node problem occurs in some types of network when a node is visible from a wireless access point (AP), but not from other nodes communicating with that AP. This leads to difficulties in medium access control (collisions).
==== Exposed terminal node problem ====
The exposed terminal problem is when a node on one network is unable to send because of co-channel interference from a node that is on a different network.
==== Shared resource problem ====
The wireless spectrum is a limited resource and shared by all nodes in the range of its transmitters. Bandwidth allocation becomes complex with multiple participating users. Often users are not aware that advertised numbers (e.g., for IEEE 802.11 equipment or LTE networks) are not their capacity, but shared with all other users and thus the individual user rate is far lower. With increasing demand, the capacity crunch is more and more likely to happen. User-in-the-loop (UIL) may be an alternative solution to ever upgrading to newer technologies for over-provisioning.
=== Capacity ===
==== Channel ====
Shannon's theorem can describe the maximum data rate of any single wireless link, which relates to the bandwidth in hertz and to the noise on the channel.
One can greatly increase channel capacity by using MIMO techniques, where multiple aerials or multiple frequencies can exploit multiple paths to the receiver to achieve much higher throughput – by a factor of the product of the frequency and aerial diversity at each end.
Under Linux, the Central Regulatory Domain Agent (CRDA) controls the setting of channels.
==== Network ====
The total network bandwidth depends on how dispersive the medium is (more dispersive medium generally has better total bandwidth because it minimises interference), how many frequencies are available, how noisy those frequencies are, how many aerials are used and whether a directional antenna is in use, whether nodes employ power control and so on.
Cellular wireless networks generally have good capacity, due to their use of directional aerials, and their ability to reuse radio channels in non-adjacent cells. Additionally, cells can be made very small using low power transmitters this is used in cities to give network capacity that scales linearly with population density.
== Safety ==
Wireless access points are also often close to humans, but the drop off in power over distance is fast, following the inverse-square law.
The position of the United Kingdom's Health Protection Agency (HPA) is that “...radio frequency (RF) exposures from WiFi are likely to be lower than those from mobile phones". It also saw “...no reason why schools and others should not use WiFi equipment". In October 2007, the HPA launched a new "systematic" study into the effects of WiFi networks on behalf of the UK government, in order to calm fears that had appeared in the media in a recent period up to that time". Dr Michael Clark, of the HPA, says published research on mobile phones and masts does not add up to an indictment of WiFi.
== See also ==
Rendezvous delay
Wireless access point
Wireless community network
Wireless grid
Wireless LAN client comparison
Wireless site survey
Network simulation
Optical mesh network
Wireless mesh network
Wireless mobility management
== References ==
== Further reading ==
Wireless Networking in the Developing World: A practical guide to planning and building low-cost telecommunications infrastructure (PDF) (2nd ed.). Hacker Friendly LLC. 2007. p. 425.
Pahlavan, Kaveh; Levesque, Allen H (1995). Wireless Information Networks. John Wiley & Sons. ISBN 0-471-10607-0.
Geier, Jim (2001). Wireless LANs. Sams. ISBN 0-672-32058-4.
Goldsmith, Andrea (2005). Wireless Communications. Cambridge University Press. ISBN 0-521-83716-2.
Lenzini, L.; Luise, M.; Reggiannini, R. (June 2001). "CRDA: A Collision Resolution and Dynamic Allocation MAC Protocol to Integrate Date and Voice in Wireless Networks". IEEE Journal on Selected Areas in Communications. 19 (6). IEEE Communications Society: 1153–1163. doi:10.1109/49.926371. ISSN 0733-8716.
Molisch, Andreas (2005). Wireless Communications. Wiley-IEEE Press. ISBN 0-470-84888-X.
Pahlavan, Kaveh; Krishnamurthy, Prashant (2002). Principles of Wireless Networks – a Unified Approach. Prentice Hall. ISBN 0-13-093003-2.
Rappaport, Theodore (2002). Wireless Communications: Principles and Practice. Prentice Hall. ISBN 0-13-042232-0.
Rhoton, John (2001). The Wireless Internet Explained. Digital Press. ISBN 1-55558-257-5.
Tse, David; Viswanath, Pramod (2005). Fundamentals of Wireless Communication. Cambridge University Press. ISBN 0-521-84527-0.
Kostas Pentikousis (March 2005). "Wireless Data Networks". Internet Protocol Journal. 8 (1). Retrieved 29 August 2011.
Pahlavan, Kaveh; Krishnamurthy, Prashant (2009). Networking Fundamentals – Wide, Local and Personal Area Communications. Wiley. ISBN 978-0-470-99290-6.
== External links == | Wikipedia/Wireless_networking |
PIC (usually pronounced as /pɪk/) is a family of microcontrollers made by Microchip Technology, derived from the PIC1640 originally developed by General Instrument's Microelectronics Division. The name PIC initially referred to Peripheral Interface Controller, and was subsequently expanded for a short time to include Programmable Intelligent Computer, though the name PIC is no longer used as an acronym for any term.
The first parts of the family were available in 1976; by 2013 the company had shipped more than twelve billion individual parts, used in a wide variety of embedded systems.
The PIC was originally designed as a peripheral for the General Instrument CP1600, the first commercially available single-chip 16-bit microprocessor. To limit the number of pins required, the CP1600 had a complex highly-multiplexed bus which was difficult to interface with, so in addition to a variety of special-purpose peripherals, General Instrument made the programmable PIC1640 as an all-purpose peripheral. With its own small RAM, ROM and a simple CPU for controlling the transfers, it could connect the CP1600 bus to virtually any existing 8-bit peripheral. While this offered considerable power, GI's marketing was limited and the CP1600 was not a success. However, GI had also made the PIC1650, a standalone PIC1640 with additional general-purpose I/O in place of the CP1600 interface. When the company spun off their chip division to form Microchip in 1985, sales of the CP1600 were all but dead, but the PIC1650 and successors had formed a major market of their own, and they became one of the new company's primary products.
Early models only had mask ROM for code storage, but with its spinoff it was soon upgraded to use EPROM and then EEPROM, which made it possible for end-users to program the devices in their own facilities. All current models use flash memory for program storage, and newer models allow the PIC to reprogram itself. Since then the line has seen significant change; memory is now available in 8-bit, 16-bit, and, in latest models, 32-bit wide. Program instructions vary in bit-count by family of PIC, and may be 12, 14, 16, or 24 bits long. The instruction set also varies by model, with more powerful chips adding instructions for digital signal processing functions. The hardware implementations of PIC devices range from 6-pin SMD, 8-pin DIP chips up to 144-pin SMD chips, with discrete I/O pins, ADC and DAC modules, and communications ports such as UART, I2C, CAN, and even USB. Low-power and high-speed variations exist for many types.
The manufacturer supplies computer software for development known as MPLAB X, assemblers and C/C++ compilers, and programmer/debugger hardware under the MPLAB and PICKit series. Third party and some open-source tools are also available. Some parts have in-circuit programming capability; low-cost development programmers are available as well as high-volume production programmers.
PIC devices are popular with both industrial developers and hobbyists due to their low cost, wide availability, large user base, an extensive collection of application notes, availability of low cost or free development tools, serial programming, and re-programmable flash-memory capability.
== History ==
=== Original concept ===
The original PIC was intended to be used with General Instrument's new CP1600 16-bit central processing unit (CPU). In order to fit 16-bit data and address buses into a then-standard 40-pin dual inline package (DIP) chip, the two buses shared the same set of 16 connection pins. In order to communicate with the CPU, devices had to watch other pins on the CPU to determine if the information on the bus was an address or data. Since only one of these was being presented at a time, the devices had to watch the bus to go into address mode, see if that address was part of its memory mapped input/output range, "latch" that address and then wait for the data mode to turn on and then read the value. Additionally, the CP1600 used several external pins to select which device it was attempting to talk to, further complicating the interfacing.
As interfacing devices to the CP1600 could be complex, GI also released the 164x series of support chips with all of the required circuitry built-in. These included keyboard drivers, cassette deck interfaces for storage, and a host of similar systems. For more complex systems, GI introduced the 1640 "Programmable Interface Controller" in 1975. The idea was that a device would use the PIC to handle all the interfacing with the host computer's CP1600, but also use its own internal processor to handle the actual device it was connected to. For instance, a floppy disk drive could be implemented with a PIC talking to the CPU on one side and the floppy disk controller on the other. In keeping with this idea, what would today be known as a microcontroller, the PIC included a small amount of read-only memory (ROM) that would be written with the user's device controller code, and a separate random access memory (RAM) for buffering and working with data. These were connected separately, making the PIC a Harvard architecture system with code and data being stored and managed on separate internal pathways.
In theory, the combination of CP1600 CPU and PIC1640 device controllers provided a very high-performance device control system, one that was similar in power and performance to the channel I/O controllers seen on mainframe computers. In the floppy controller example, for instance, a single PIC could control the drive, provide a reasonable amount of buffering to improve performance, and then transfer data to and from the host computer using direct memory access (DMA) or through relatively simple code in the CPU. The downside to this approach was cost; while the PIC was not necessary for low-speed devices like a keyboard, many tasks would require one or more PICs to build out a complete system.
While the design concept had a number of attractive features, General Instrument never strongly marketed the CP1600, preferring to deal only with large customers and ignoring the low-end market. This resulted in very little uptake of the system, with the Intellivision being the only really widespread use with about three million units. However, GI had introduced a standalone model PIC1650 in 1976, designed for use without a CP1600. Although not as powerful as the Intel MCS-48 introduced the same year, it was cheaper, and it found a market. Follow-ons included the PIC1670, with instructions widened from 12 to 13 bits to provide twice the address space (64 bytes of RAM and 1024 words of ROM). When GI spun off its chip division to form Microchip Technology in 1985, production of the CP1600 ended. By this time, however, the PIC1650 had developed a large market of customers using it for a wide variety of roles, and the PIC went on to become one of the new company's primary products.
=== After the CP1600 ===
In 1985, General Instrument sold their microelectronics division and the new owners cancelled almost everything which by this time was mostly out-of-date. The PIC, however, was upgraded with an internal EPROM to produce a programmable channel I/O controller.
At the same time Plessey in the UK released NMOS processors numbered PIC1650 and PIC1655 based on the GI design, using the same instruction sets, either user mask programmable or versions pre-programmed for auto-diallers and keyboard interfaces.
In 1998 Microchip introduced the PIC16F84, a flash programmable and erasable version of its successful serial programmable PIC16C84.
In 2001, Microchip introduced more flash programmable devices, with full production commencing in 2002.
Today, a huge variety of PICs are available with various on-board peripherals (serial communication modules, UARTs, motor control kernels, etc.) and program memory from 256 words to 64K words and more. A "word" is one assembly language instruction, varying in length from 8 to 16 bits, depending on the specific PIC microcontroller series.
While PIC and PICmicro are now registered trademarks of Microchip Technology, the prefix ″PIC″ is no longer used as an acronym for any term. It is generally thought that PIC stands for "Programmable Intelligent Computer", General Instruments' prefix in 1977 for the PIC1640 and PIC1650 family of microcomputers, replacing the 1976 original meaning "Programmable Interface Controller" for the PIC1640 that was designed specifically to work in combination with the CP1600 microcomputer. The "PIC Series Microcomputers" by General Instrument were a series of Metal-Oxide Semiconductor Large-Scale Integration (MOS/LSI) 8-bit microcomputers containing ROM, RAM, a CPU, and 8-bit input/output (I/O) registers for interfacing. At its time, this technology combined the advantages of MOS circuits with Large-Scale Integration, allowing for the creation of complex integrated circuits with high transistor density.
The Microchip 16C84 (PIC16x84), introduced in 1993, was the first Microchip CPU with on-chip EEPROM memory.
By 2013, Microchip was shipping over one billion PIC microcontrollers every year.
== Device families ==
PIC micro chips are designed with a Harvard architecture, and are offered in various device families. The baseline and mid-range families use 8-bit wide data memory, and the high-end families use 16-bit data memory. The latest series, PIC32MZ, is a 32-bit MIPS-based microcontroller. Instruction word sizes are 12 bits (PIC10 and PIC12), 14 bits (PIC16) and 24 bits (PIC24 and dsPIC). The binary representations of the machine instructions vary by family and are shown in PIC instruction listings.
Within these families, devices may be designated PICnnCxxx (CMOS) or PICnnFxxx (Flash). "C" devices are generally classified as "Not suitable for new development" (not actively promoted by Microchip). The program memory of "C" devices is variously described as OTP, ROM, or EEPROM. As of October 2016, the only OTP product classified as "In production" is the pic16HV540. "C" devices with quartz windows (for UV erasure) are in general no longer available.
=== PIC10 and PIC12 ===
These devices feature a 12-bit wide code memory, a 32-byte register file, and a tiny two level deep call stack. They are represented by the PIC10 series, as well as by some PIC12 and PIC16 devices. Baseline devices are available in 6-pin to 40-pin packages.
Generally the first 7 to 9 bytes of the register file are special-purpose registers, and the remaining bytes are general purpose RAM. Pointers are implemented using a register pair: after writing an address to the FSR (file select register), the INDF (indirect f) register becomes an alias for the addressed register. If banked RAM is implemented, the bank number is selected by the high 3 bits of the FSR. This affects register numbers 16–31; registers 0–15 are global and not affected by the bank select bits.
Because of the very limited register space (5 bits), 4 rarely read registers were not assigned addresses, but written by special instructions (OPTION and TRIS).
The ROM address space is 512 and may only specify addresses in the first half of each 512-word page. That is, the CALL instruction specifies the low 9 bits of the address, but only the low 8 bits of that address are a parameter of the instruction, while the 9th bit (bit 8) is implicitly specified as 0 by the CALL instruction itself.
Lookup tables are implemented using a computed GOTO (assignment to PCL register) into a table of RETLW instructions. RETLW performs a subroutine return and simultaneously loads the W register with an 8-bit immediate constant that is part of the instruction.
This "baseline core" does not support interrupts; all I/O must be polled. There are some "enhanced baseline" variants with interrupt support and a four-level call stack.
PIC10F32x devices feature a mid-range 14-bit wide code memory of 256 or 512 words, a 64-byte SRAM register file, and an 8-level deep hardware stack. These devices are available in 6-pin SMD and 8-pin DIP packages (with two pins unused). One input only and three I/O pins are available. A complex set of interrupts are available. Clocks are an internal calibrated high-frequency oscillator of 16 MHz with a choice of selectable speeds via software and a 31 kHz low-power source.
=== PIC16 ===
These devices feature a 14-bit wide code memory, and an improved 8-level deep call stack. The instruction set differs very little from the baseline devices, but the two additional opcode bits allow 128 registers and 2048 words of code to be directly addressed. There are a few additional miscellaneous instructions, and two additional 8-bit literal instructions, add and subtract. The mid-range core is available in the majority of devices labeled PIC12 and PIC16.
The first 32 bytes of the register space are allocated to special-purpose registers; the remaining 96 bytes are used for general-purpose RAM. If banked RAM is used, the high 16 registers (0x70–0x7F) are global, as are a few of the most important special-purpose registers, including the STATUS register, which holds the RAM bank select bits. (The other global registers are FSR and INDF, the low 8 bits of the program counter PCL, the PC high preload register PCLATH, and the master interrupt control register INTCON.)
The PCLATH register supplies high-order instruction address bits when the 8 bits supplied by a write to the PCL register, or the 11 bits supplied by a GOTO or CALL instruction, are not sufficient to address the available ROM space.
=== PIC17 ===
The PIC17 series never became popular and has been superseded by the PIC18 architecture (however, see clones below). The PIC17 series is not recommended for new designs, and availability may be limited to users.
Improvements over earlier cores are 16-bit wide opcodes (allowing many new instructions), and a 16-level deep call stack. PIC17 devices were produced in packages from 40 to 68 pins.
The PIC17 series introduced a number of important new features:
a memory mapped accumulator
read access to code memory (table reads)
direct register-to-register moves (prior cores needed to move registers through the accumulator)
an external program memory interface to expand the code space
an 8-bit × 8-bit hardware multiplier
a second indirect register pair
auto-increment/auto-decrement addressing controlled by control bits in a status register (ALUSTA)
A significant limitation was that RAM space was limited to 256 bytes (26 bytes of special function registers, and 232 bytes of general-purpose RAM), with awkward bank-switching in the models that supported more.
=== PIC18 ===
In 2000, Microchip introduced the PIC18 architecture. Unlike the PIC17 series, it has proven to be very popular, with a large number of device variants presently in manufacture. In contrast to earlier devices, which were more often than not programmed in assembly language, C has become the predominant development language.
The PIC18 series inherits most of the features and instructions of the PIC17 series, while adding a number of important new features:
call stack is 21 bits wide and much deeper (31 levels deep)
the call stack may be read and written (TOSU:TOSH:TOSL registers)
conditional branch instructions
indexed addressing mode (PLUSW)
the FSR registers are extended to 12 bits, allowing them to linearly address the entire data address space
the addition of another FSR register (bringing the number up to 3)
The RAM space is 12 bits, addressed using a 4-bit bank select register (BSR) and an 8-bit offset in each instruction. An additional "access" bit in each instruction selects between bank 0 (a=0) and the bank selected by the BSR (a=1).
A 1-level stack is also available for the STATUS, WREG and BSR registers. They are saved on every interrupt, and may be restored on return. If interrupts are disabled, they may also be used on subroutine call/return by setting the s bit (appending ", FAST" to the instruction).
The auto increment/decrement feature was improved by removing the control bits and adding four new indirect registers per FSR. Depending on which indirect file register is being accessed, it is possible to postdecrement, postincrement, or preincrement FSR; or form the effective address by adding W to FSR.
In more advanced PIC18 devices, an "extended mode" is available which makes the addressing even more favorable to compiled code:
a new offset addressing mode; some addresses which were relative to the access bank are now interpreted relative to the FSR2 register
the addition of several new instructions, notably for manipulating the FSR registers.
PIC18 devices are still developed (2021) and fitted with CIP (Core Independent Peripherals)
=== PIC24 and dsPIC ===
In 2001, Microchip introduced the dsPIC series of chips, which entered mass production in late 2004. They are Microchip's first inherently 16-bit microcontrollers. PIC24 devices are designed as general purpose microcontrollers. dsPIC devices include digital signal processing capabilities in addition.
Although still similar to earlier PIC architectures, there are significant enhancements:
All registers are 16 bits wide
Program counter is 22 bits (bits 22:1; bit 0 is always 0)
Instructions are 24 bits wide
Data address space expanded to 64 KiB
First 2 KiB is reserved for peripheral control registers
Data bank switching is not required unless RAM exceeds 62 KiB
"f operand" direct addressing extended to 13 bits (8 KiB)
16 W registers available for register-register operations.(But operations on f operands always reference W0.)
Instructions come in byte and (16-bit) word forms
Stack is in RAM (with W15 as stack pointer); there is no hardware stack
W14 is the frame pointer
Data stored in ROM may be accessed directly ("Program Space Visibility")
Vectored interrupts for different interrupt sources
Some features are:
(16×16)-bit single-cycle multiplication and other digital signal processing operations
hardware multiply–accumulate (MAC)
hardware divide assist (19 cycles for 32/16-bit divide)
barrel shifting - for both accumulators and general purpose registers
bit reversal
hardware support for loop indexing
peripheral direct memory access
dsPICs can be programmed in C using Microchip's XC16 compiler (formerly called C30), which is a variant of GCC.
Instruction ROM is 24 bits wide. Software can access ROM in 16-bit words, where even words hold the least significant 16 bits of each instruction, and odd words hold the most significant 8 bits. The high half of odd words reads as zero. The program counter is 23 bits wide, but the least significant bit is always 0, so there are 22 modifiable bits.
Instructions come in two main varieties, with most important operations (add, xor, shifts, etc.) allowing both forms:
The first is like the classic PIC instructions, with an operation between a specified f register (i.e. the first 8K of RAM) and a single accumulator W0, with a destination select bit selecting which is updated with the result. (The W registers are memory-mapped. so the f operand may be any W register.)
The second form is more conventional, allowing three operands, which may be any of 16 W registers. The destination and one of the sources also support addressing modes, allowing the operand to be in memory pointed to by a W register.
=== PIC32M MIPS-based line ===
Microchip's PIC32M products use the PIC trademark, but have a completely different architecture, and are described here only briefly.
==== PIC32MX ====
In November 2007, Microchip introduced the PIC32MX family of 32-bit microcontrollers, based on the MIPS32 M4K Core. The device can be programmed using the Microchip MPLAB C Compiler for PIC32 MCUs, a variant of the GCC compiler. The first 18 models currently in production (PIC32MX3xx and PIC32MX4xx) are pin to pin compatible and share the same peripherals set with the PIC24FxxGA0xx family of (16-bit) devices, allowing the use of common libraries, software and hardware tools. Today, starting at 28 pin in small QFN packages up to high performance devices with Ethernet, CAN and USB OTG, full family range of mid-range 32-bit microcontrollers are available.
The PIC32 architecture brought a number of new features to Microchip portfolio, including:
The highest execution speed 80 MIPS (120+ Dhrystone MIPS @ 80 MHz)
The largest flash memory: 512 kB
One instruction per clock cycle execution
The first cached processor
Allows execution from RAM
Full Speed Host/Dual Role and OTG USB capabilities
Full JTAG and 2-wire programming and debugging
Real-time trace
==== PIC32MZ ====
In November 2013, Microchip introduced the PIC32MZ series of microcontrollers, based on the MIPS M14K core. The PIC32MZ series include:
252 MHz core speed, 415 DMIPS
Up to 2 MB Flash and 512 KB RAM
New peripherals including high-speed USB, crypto engine and SQI
In 2015, Microchip released the PIC32MZ EF family, using the updated MIPS M5150 Warrior M-class processor.
In 2017, Microchip introduced the PIC32MZ DA Family, featuring an integrated graphics controller, graphics processor and 32MB of DDR2 DRAM.
==== PIC32MM ====
In June 2016, Microchip introduced the PIC32MM family, specialized for low-power and low-cost applications. The PIC32MM features core-independent peripherals, sleep modes down to 500 nA, and 4 x 4 mm packages. The PIC32MM microcontrollers use the MIPS Technologies M4K, a 32-bit MIPS32 processor.
They are meant for very low power consumption and limited to 25 MHz.
Their key advantage is to support the 16-bit instructions of MIPS, making program size much more compact (about 40%)
==== PIC32MK ====
Microchip introduced the PIC32MK family in 2017, specialized for motor control, industrial control, Industrial Internet of Things (IIoT) and multi-channel CAN applications.
=== PIC32C Arm-based line ===
Microchip's PIC32C products also use the PIC trademark, but similarly have a completely different architecture. PIC32C products employ the Arm processor architecture, including various lines using Cortex-M0+, M4, M7, M23, and M33 cores. They are offered in addition to the Arm-based SAM series of MCUs which Microchip inherited from its acquisition of Atmel.
=== PIC64 ===
Microchip's PIC64 products use the PIC trademark, but have a completely different architecture, and are described here only briefly.
In July 2024, Microchip introduced the PIC64 series of high-performance multi-core microprocessors. The series will initially use the RISC-V instruction set, however Microchip is also planning versions with ARM Cortex-A cores. The PIC64 series will include the PIC64GX line, which focuses on intelligent edge applications, and the PIC64-HPSC line, which is radiation-hardened and focuses on spaceflight applications.
== Core architecture ==
The PIC architecture (excluding the unrelated PIC32 and PIC64) is a one-operand accumulator machine like the PDP-8 or the Apollo Guidance Computer. Its characteristics are:
One accumulator (W0), which is an implied operand of almost every instruction.
A small number of fixed-length instructions, with mostly fixed timing (2 clock cycles, or 4 clock cycles in 8-bit models).
A small amount of addressable data space (32, 128, or 256 bytes, depending on the family), extended through banking
Separate code and data spaces (Harvard architecture).
Instruction memory is wider than data memory, allowing immediate constants within an instruction. (This is a major difference from the other early accumulator machines mentioned above.)
The second operand is a memory location or an immediate constant.
There are no other addressing modes, although an indirect address mode can be emulated using the indirect register(s).
Data-space mapped CPU, port, and peripheral registers
ALU status flags are mapped into the data space
The program counter is also mapped into the data space and writeable (this is used to implement indirect jumps).
A hardware stack for storing return addresses
There are only unconditional branch instructions
Conditional execution is achieved via conditional skip instructions, which conditionally nullify the following instruction.
There is no distinction between memory space and register space because the RAM serves the job of both memory and registers, and the RAM is usually just referred to as "the register file" or simply as "the registers".
=== Data space (RAM) ===
PICs have a set of registers that function as general-purpose RAM. Special-purpose control registers for on-chip hardware resources are also mapped into the data space. The addressability of memory varies depending on device series, and all PIC device types have some banking mechanism to extend addressing to additional memory (but some device models have only one bank implemented). Later series of devices feature move instructions, which can cover the whole addressable space, independent of the selected bank. In earlier devices, any register move must be achieved through the accumulator.
To implement indirect addressing, a "file select register" (FSR) and "indirect register" (INDF) are used. A register number is written to the FSR, after which reads from or writes to INDF will actually be from or to the register pointed to by FSR. Later devices extended this concept with post- and pre- increment/decrement for greater efficiency in accessing sequentially stored data. This also allows FSR to be treated almost like a stack pointer (SP).
External data memory is not directly addressable except in some PIC18 devices with high pin count. However, general I/O ports can be used to implement a parallel bus or a serial interface for accessing external memory and other peripherals (using subroutines), with the caveat that such programmed memory access is (of course) much slower than access to the native memory of the PIC MCU.
=== Code space ===
The code space is generally implemented as on-chip ROM, EPROM or flash ROM. In general, there is no provision for storing code in external memory due to the lack of an external memory interface. The exceptions are PIC17 and select high pin count PIC18 devices.
=== Word size ===
All PICs handle (and address) data in 8-bit chunks. However, the unit of addressability of the code space is not generally the same as the data space. For example, PICs in the baseline (PIC12) and mid-range (PIC16) families have program memory addressable in the same wordsize as the instruction width, i.e. 12 or 14 bits respectively. In contrast, in the PIC18 series, the program memory is addressed in 8-bit increments (bytes), which differs from the instruction width of 16 bits.
In order to be clear, the program memory capacity is usually stated in number of (single-word) instructions, rather than in bytes.
=== Stacks ===
PICs have a hardware call stack, which is used to save return addresses. The hardware stack is not software-accessible on earlier devices, but this changed with the PIC18 series devices.
Hardware support for a general-purpose parameter stack was lacking in early series, but this greatly improved in the PIC18 series, making the PIC18 series architecture more friendly to high-level language compilers.
=== Instruction set ===
PIC instruction sets vary from about 35 instructions for the low-end PICs to over 80 instructions for the high-end PICs. The instruction set includes instructions to perform a variety of operations on registers directly, on the accumulator and a literal constant, or on the accumulator and a register, as well as for conditional execution, and program branching.
A few operations, such as bit setting and testing, can be performed on any numbered register, but 2-input arithmetic operations always involve W (the accumulator), writing the result back to either W or the other operand register. To load a constant, it is necessary to load it into W before it can be moved into another register. On the older cores, all register moves needed to pass through W, but this changed on the "high-end" cores.
PIC cores have skip instructions, which are used for conditional execution and branching. The skip instructions are "skip if bit set" and "skip if bit not set". Because cores before PIC18 had only unconditional branch instructions, conditional jumps are implemented by a conditional skip (with the opposite condition) followed by an unconditional branch. Skips are also of utility for conditional execution of any immediate single following instruction. It is possible to skip skip instructions. For example, the instruction sequence "skip if A; skip if B; C" will execute C if A is true or if B is false.
The PIC18 series implemented shadow registers: these are registers which save several important registers during an interrupt, providing hardware support for automatically saving processor state when servicing interrupts.
In general, PIC instructions fall into five classes:
Operation on working register (WREG) with 8-bit immediate ("literal") operand. E.g. movlw (move literal to WREG), andlw (AND literal with WREG). One instruction peculiar to the PIC is retlw, load immediate into WREG and return, which is used with computed branches to produce lookup tables.
Operation with WREG and indexed register. The result can be written to either the working register (e.g. addwf reg,w). or the selected register (e.g. addwf reg,f).
Bit operations. These take a register number and a bit number, and perform one of 4 actions: set or clear a bit, and test and skip on set/clear. The latter are used to perform conditional branches. The usual ALU status flags are available in a numbered register so operations such as "branch on carry clear" are possible.
Control transfers. Other than the skip instructions previously mentioned, there are only two: goto and call.
A few miscellaneous zero-operand instructions, such as return from subroutine, and sleep to enter low-power mode.
=== Performance ===
The architectural decisions are directed at the maximization of speed-to-cost ratio. The PIC architecture was among the first scalar CPU designs and is still among the simplest and cheapest. The Harvard architecture, in which instructions and data come from separate sources, simplifies timing and microcircuit design greatly, and this benefits clock speed, price, and power consumption.
The PIC instruction set is suited to implementation of fast lookup tables in the program space. Such lookups take one instruction and two instruction cycles. Many functions can be modeled in this way. Optimization is facilitated by the relatively large program space of the PIC (e.g. 4096 × 14-bit words on the 16F690) and by the design of the instruction set, which allows embedded constants. For example, a branch instruction's target may be indexed by W, and execute a "RETLW", which does as it is named – return with literal in W.
Interrupt latency is constant at three instruction cycles. External interrupts have to be synchronized with the four-clock instruction cycle, otherwise there can be a one instruction cycle jitter. Internal interrupts are already synchronized. The constant interrupt latency allows PICs to achieve interrupt-driven low-jitter timing sequences. An example of this is a video sync pulse generator. This is no longer true in the newest PIC models, because they have a synchronous interrupt latency of three or four cycles.
=== Advantages ===
Small instruction set to learn
RISC architecture
Built-in oscillator with selectable speeds
Easy entry level, in-circuit programming plus in-circuit debugging PICkit units available for less than $50
Inexpensive microcontrollers
Wide range of interfaces including I²C, SPI, USB, UART, A/D, programmable comparators, PWM, LIN, CAN, PSP, and Ethernet
Availability of processors in DIL package makes them easy to handle for hobby use.
=== Limitations ===
One accumulator
Register-bank switching is required to access the entire RAM of many devices
Operations and registers are not orthogonal; some instructions can address RAM and/or immediate constants, while others can use the accumulator only.
The following stack limitations have been addressed in the PIC18 series, but still apply to earlier cores:
The hardware call stack is not addressable, so preemptive task switching cannot be implemented
Software-implemented stacks are not efficient, so it is difficult to generate reentrant code and support local variables
With paged program memory, there are two page sizes to worry about: one for CALL and GOTO and another for computed GOTO (typically used for table lookups). For example, on PIC16, CALL and GOTO have 11 bits of addressing, so the page size is 2048 instruction words. For computed GOTOs, where you add to PCL, the page size is 256 instruction words. In both cases, the upper address bits are provided by the PCLATH register. This register must be changed every time control transfers between pages. PCLATH must also be preserved by any interrupt handler.
=== Compiler development ===
While several commercial compilers are available, in 2008, Microchip released their own C compilers, C18 and C30, for the line of 18F 24F and 30/33F processors.
As of 2013, Microchip offers their XC series of compilers, for use with MPLAB X. Microchip will eventually phase out its older compilers, such as C18, and recommends using their XC series compilers for new designs.
The RISC instruction set of the PIC assembly language code can make the overall flow difficult to comprehend. Judicious use of simple macros can increase the readability of PIC assembly language. For example, the original Parallax PIC assembler ("SPASM") has macros, which hide W and make the PIC look like a two-address machine. It has macro instructions like mov b, a (move the data from address a to address b) and add b, a (add data from address a to data in address b). It also hides the skip instructions by providing three-operand branch macro instructions, such as cjne a, b, dest (compare a with b and jump to dest if they are not equal).
== Hardware features ==
PIC devices generally feature:
Flash memory (program memory, programmed using MPLAB devices)
SRAM (data memory)
EEPROM (programmable at run-time)
Sleep mode (power savings)
Watchdog timer
Various crystal or RC oscillator configurations, or an external clock
=== Variants ===
Within a series, there are still many device variants depending on what hardware resources the chip features:
General purpose I/O pins
Internal clock oscillators
8/16/32 bit timers
Synchronous/Asynchronous Serial Interface USART
MSSP Peripheral for I²C and SPI communications
Capture/Compare and PWM modules
Analog-to-digital converters (up to ~1.0 Msps)
USB, Ethernet, CAN interfacing support
External memory interface
Integrated analog RF front ends (PIC16F639, and rfPIC).
KEELOQ Rolling code encryption peripheral (encode/decode)
And many more
=== Trends ===
The first generation of PICs with EPROM storage have been almost completely replaced by chips with flash memory. Likewise, the original 12-bit instruction set of the PIC1650 and its direct descendants has been superseded by 14-bit and 16-bit instruction sets. Microchip still sells OTP (one-time-programmable) and windowed (UV-erasable) versions of some of its EPROM based PICs for legacy support or volume orders. The Microchip website lists PICs that are not electrically erasable as OTP. UV erasable windowed versions of these chips can be ordered.
=== Part number ===
The F in a PICMicro part number generally indicates the PICmicro uses flash memory and can be erased electronically. Conversely, a C generally means it can only be erased by exposing the die to ultraviolet light (which is only possible if a windowed package style is used). An exception to this rule is the PIC16C84, which uses EEPROM and is therefore electrically erasable.
An L in the name indicates the part will run at a lower voltage, often with frequency limits imposed. Parts designed specifically for low voltage operation, within a strict range of 3 – 3.6 volts, are marked with a J in the part number. These parts are also uniquely I/O tolerant as they will accept up to 5 V as inputs.
== Development tools ==
Microchip provides a freeware IDE package called MPLAB X, which includes an assembler, linker, software simulator, and debugger. They also sell C compilers for the PIC10, PIC12, PIC16, PIC18, PIC24, PIC32 and dsPIC, which integrate cleanly with MPLAB X. Free versions of the C compilers are also available with all features. But for the free versions, optimizations will be disabled after 60 days.
Several third parties develop C language compilers for PICs, many of which integrate to MPLAB and/or feature their own IDE. A fully featured compiler for the PICBASIC language to program PIC microcontrollers is available from meLabs, Inc. Mikroelektronika offers PIC compilers in C, BASIC and Pascal programming languages.
A graphical programming language, Flowcode, exists capable of programming 8- and 16-bit PIC devices and generating PIC-compatible C code. It exists in numerous versions from a free demonstration to a more complete professional edition.
The Proteus Design Suite is able to simulate many of the popular 8 and 16-bit PIC devices along with other circuitry that is connected to the PIC on the schematic. The program to be simulated can be developed within Proteus itself, MPLAB or any other development tool.
== Device programmers ==
Devices called "programmers" are traditionally used to get program code into the target PIC. Most PICs that Microchip currently sells feature ICSP (in-circuit serial programming) and/or LVP (low-voltage programming) capabilities, allowing the PIC to be programmed while it is sitting in the target circuit.
Microchip offers programmers/debuggers under the MPLAB and PICKit series. MPLAB ICD5 and MPLAB REAL ICE are the current programmers and debuggers for professional engineering, while PICKit 5 is a low-cost programmer / debugger line for hobbyists and students.
=== Bootloading ===
Many of the higher end flash based PICs can also self-program (write to their own program memory), a process known as bootloading. Demo boards are available with a small factory-programmed bootloader that can be used to load user programs over an interface such as RS-232 or USB, thus obviating the need for a programmer device.
Alternatively there is bootloader firmware available that the user can load onto the PIC using ICSP. After programming the bootloader onto the PIC, the user can then reprogram the device using RS232 or USB, in conjunction with specialized computer software.
The advantages of a bootloader over ICSP is faster programming speeds, immediate program execution following programming, and the ability to both debug and program using the same cable.
=== Third party ===
There are many programmers for PIC microcontrollers, ranging from the extremely simple designs which rely on ICSP to allow direct download of code from a host computer, to intelligent programmers that can verify the device at several supply voltages. Many of these complex programmers use a pre-programmed PIC themselves to send the programming commands to the PIC that is to be programmed. The intelligent type of programmer is needed to program earlier PIC models (mostly EPROM type) which do not support in-circuit programming.
Third party programmers range from plans to build your own, to self-assembly kits and fully tested ready-to-go units. Some are simple designs which require a PC to do the low-level programming signalling (these typically connect to the serial or parallel port and consist of a few simple components), while others have the programming logic built into them (these typically use a serial or USB connection, are usually faster, and are often built using PICs themselves for control).
== Debugging ==
=== In-circuit debugging ===
All newer PIC devices feature an ICD (in-circuit debugging) interface, built into the CPU core, that allows for interactive debugging of the program in conjunction with MPLAB IDE. MPLAB ICD and MPLAB REAL ICE debuggers can communicate with this interface using the ICSP interface.
This debugging system comes at a price however, namely limited breakpoint count (1 on older devices, 3 on newer devices), loss of some I/O (with the exception of some surface mount 44-pin PICs which have dedicated lines for debugging) and loss of some on-chip features.
Some devices do not have on-chip debug support, due to cost or lack of pins. Some larger chips also have no debug module. To debug these devices, a special -ICD version of the chip mounted on a daughter board which provides dedicated ports is required. Some of these debug chips are able to operate as more than one type of chip by the use of selectable jumpers on the daughter board. This allows broadly identical architectures that do not feature all the on-chip peripheral devices to be replaced by a single -ICD chip. For example: the 16F690-ICD will function as one of six different parts, each of which features none, some or all of five on-chip peripherals.
=== In-circuit emulators ===
Microchip offers three full in-circuit emulators: the MPLAB ICE2000 (parallel interface, a USB converter is available); the newer MPLAB ICE4000 (USB 2.0 connection); and most recently, the REAL ICE (USB 2.0 connection). All such tools are typically used in conjunction with MPLAB IDE for source-level interactive debugging of code running on the target.
== Operating systems ==
PIC projects may utilize real-time operating systems such as FreeRTOS, AVIX RTOS, uRTOS, Salvo RTOS or other similar libraries for task scheduling and prioritization.
An open source project by Serge Vakulenko adapts 2.11BSD to the PIC32 architecture, under the name RetroBSD. This brings a familiar Unix-like operating system, including an onboard development environment, to the microcontroller, within the constraints of the onboard hardware.
== Clones ==
=== Parallax ===
Parallax produced a series of PICmicro-like microcontrollers known as the Parallax SX. It is currently discontinued. Designed to be architecturally similar to the PIC microcontrollers used in the original versions of the BASIC Stamp, SX microcontrollers replaced the PIC in several subsequent versions of that product.
Parallax's SX are 8-bit RISC microcontrollers, using a 12-bit instruction word, which run fast at 75 MHz (75 MIPS). They include up to 4096 12-bit words of flash memory and up to 262 bytes of random access memory, an eight bit counter and other support logic. There are software library modules to emulate I²C and SPI interfaces, UARTs, frequency generators, measurement counters and PWM and sigma-delta A/D converters. Other interfaces are relatively easy to write, and existing modules can be modified to get new features.
=== PKK Milandr ===
Russian PKK Milandr produces microcontrollers using the PIC17 architecture as the 1886 series.
Program memory consists of up to 64kB Flash memory in the 1886VE2U (Russian: 1886ВЕ2У) or 8kB EEPROM in the 1886VE5U (1886ВЕ5У). The 1886VE5U (1886ВЕ5У) through 1886VE7U (1886ВЕ7У) are specified for the military temperature range of -60 °C to +125 °C. Hardware interfaces in the various parts include USB, CAN, I2C, SPI, as well as A/D and D/A converters. The 1886VE3U (1886ВЕ3У) contains a hardware accelerator for cryptographic functions according to GOST 28147-89. There are even radiation-hardened chips with the designations 1886VE8U (1886ВЕ8У) and 1886VE10U (1886ВЕ10У).
=== ELAN Microelectronics ===
ELAN Microelectronics Corp. in Taiwan make a line of microcontrollers based on the PIC16 architecture, with 13-bit instructions and a smaller (6-bit) RAM address space.
=== Holtek Semiconductor ===
Holtek Semiconductor make a large number of very cheap microcontrollers (as low as 8.5 cents in quantity) with a 14-bit instruction set strikingly similar to the PIC16.
=== Hycon ===
Hycon Technology, a Taiwanese manufacturer of mixed-signal chips for portable electronics (multimeters, kitchen scales, etc.), has a proprietary H08 microcontroller series with a 16-bit instruction word very similar to the PIC18 family. (No relation to the Hitachi/Renesas H8 microcontrollers.) The H08A is most like the PIC18; the H08B is a subset.
Although the available instructions are almost identical, their encoding is different, as is the memory map and peripherals. For example, the PIC18 allows direct access to RAM at 0x000–0x07F or special function registers at 0xF80–0xFFF by sign-extending an 8-bit address. The H08 places special function registers at 0x000–0x07F and global RAM at 0x080–0x0FF, zero-extending the address.
=== Other manufacturers in Asia ===
Many ultra-low-cost OTP microcontrollers from Asian manufacturers, found in low-cost consumer electronics are based on the PIC architecture or modified form. Most clones only target the baseline parts (PIC16C5x/PIC12C50x). With any patents on the basic architecture long since expired, Microchip has attempted to sue some manufacturers on copyright grounds,
without success.
== See also ==
PIC16x84
Atmel AVR
Arduino
BASIC Atom
BASIC Stamp
OOPic
PICAXE
TI MSP430
Maximite
== References ==
== Further reading ==
Microcontroller Theory and Applications, with the PIC18F; 2nd Ed; M. Rafiquzzaman; Wiley; 544 pages; 2018; ISBN 978-1119448419.
Microcontroller System Design Using PIC18F Processors; Nicolas K. Haddad; IGI Global; 428 pages; 2017; ISBN 978-1683180005.
PIC Microcontroller Projects in C: Basic to Advanced (for PIC18F); 2nd Ed; Dogan Ibrahim; Newnes; 660 pages; 2014; ISBN 978-0080999241. (1st Ed)
Microcontroller Programming: Microchip PIC; Sanchez and Canton; CRC Press; 824 pages; 2006; ISBN 978-0849371899. (1st Ed)
PIC Microcontroller Project Book; John Iovine; TAB; 272 pages; 2000; ISBN 978-0071354790. (1st Ed)
== External links ==
.
Official Microchip website
PIC wifi projects website | Wikipedia/PIC_microcontroller |
Maxim Integrated Products, Inc., was an American semiconductor company that designed, manufactured, and sold analog and mixed-signal integrated circuits for the automotive, industrial, communications, consumer, and computing markets. Maxim's product portfolio included power and battery management ICs, sensors, analog ICs, interface ICs, communications solutions, digital ICs, embedded security, and microcontrollers. The company is headquartered in San Jose, California, and has design centers, manufacturing facilities, and sales offices worldwide. In 2021, the company was acquired by Analog Devices.
== History ==
Maxim was founded in April 1983. The founding team included Jack Gifford, a semiconductor industry pioneer since the 1960s and co-founder of Advanced Micro Devices; Fred Beck, an IC sales and distribution pioneer; Dave Bingham, General Electric’s Scientist of the Year in 1982; Steve Combs, a pioneer in wafer technologies and manufacturing; Lee Evans, also a pioneer in CMOS analog microchip design and General Electric’s Scientist of the Year in 1982; Dave Fullagar, inventor of the first internally compensated operational amplifier circuit; Roger Fuller, a pioneer in CMOS microchip design; Rich Hood, development director for some of the first microprocessor-controlled semiconductor test systems; and Dick Wilenken, who is acknowledged as the father of key analog switch and multiplexer technologies.
Based on a two-page business plan, they obtained US$9 million in venture capital financing to establish the company.
In its first year, the company developed 24 second source products.
In 1985, the company introduced the MAX600.
Maxim recorded its first profitable fiscal year in 1987, with the help of the MAX232.
In 1988, the company became a public company via an initial public offering.
In 1989, the company purchased its first wafer fabrication facility, in Sunnyvale, California, from bankrupt Saratoga Semiconductor for only $5-million.
In 1994, the company acquired the integrated circuits division of Tektronix, based in Beaverton, Oregon, giving it high-speed bipolar processes for wireless RF and fiber-optic products.
In 1997, the company acquired a wafer fab in San Jose, California from IC Works for $42 million.
In April 2001, the company acquired Dallas Semiconductor in Dallas, Texas in a stock transaction, to gain expertise in digital and mixed-signal CMOS design, as well as an additional wafer fab.
In October 2003, the company acquired a submicrometre CMOS fab from Philips in San Antonio, Texas for $40 million to ramp up capacity and support processes down to the 0.25-micrometre level.
In May 2007, the company acquired an 0.18-micrometre fab from Atmel in Irving, Texas, for $38 million, approximately doubling fab capacity. In August 2007, it acquired Vitesse Semiconductor’s Storage Products Division in Colorado Springs, Colorado, adding Serial ATA (SATA), Serial Attached SCSI (SAS), and enclosure-management products to Maxim’s product portfolio.
From October 2007 to October 2008, Maxim's common stock was delisted from the Nasdaq Stock Exchange due to the company's inability to file financial statements related to stock option backdating. Maxim's stock was traded over-the-counter and quoted via Pink Sheets LLC until the company completed its restatement in 2008. Maxim's CFO Carl Jasper resigned due to an investigation into the issue by Maxim's board of directors. Maxim restated its earnings in September 2008 and was relisted on the Nasdaq Stock Exchange on October 8, 2008.
In 2008, the company acquired Mobilygen based in Santa Clara, California, to add H.264 video-compression technology to its portfolio.
In 2009, the company acquired Innova Card, headquartered in La Ciotat, France, to enrich its position in the financial transaction terminal semiconductor market. It also acquired two product lines from Zilog: the Secure Transactions product line, featuring the Zatara family and the hardware portion of Zilog's Wireless Control product line, commonly found in universal remote controls.
In 2010, the company acquired Teridian Semiconductor from Golden Gate Capital for $315 million. Teridian was a fabless semiconductor company based in Irvine, California, supplying System-on-a-chip (SoC) for the smart meter market. It also acquired Trinity Convergence Limited, a software company based in Cambridge, United Kingdom, a part of the ecosystem to bring Skype video conferencing to the LCD TV market. It also acquired Phyworks, a supplier of optical transceiver chips for the broadband communications market, for $72.5 million.
In November 2010, the company shipped its first analog product on a 300mm wafer.
In July 2011, the company acquired SensorDynamics, a semiconductor company that develops proprietary sensor and microelectromechanical systems. Also in 2011, it acquired Cambridge Analog Technologies, a company based in Billerica, Massachusetts, that focused on licensing analog designs including low power ADCs and other analog blocks.
In 2012, the company acquired Genasic Design Systems, a fabless RF chip company that makes chips for LTE applications.
In October 2013, the company acquired Volterra Semiconductor, a manufacturer of power management equipment.
In February 2018, the company acquired Icron Technologies, a manufacturer of USB and video extension products.
In June 2020, the company acquired Trinamic, a producer of motion control products.
On August 26, 2021, the company was acquired by Analog Devices.
== References ==
== External links ==
Official website | Wikipedia/Maxim_Integrated |
Renesas Electronics Corporation (ルネサス エレクトロニクス株式会社, Runesasu Erekutoronikusu Kabushiki Gaisha) is a Japanese semiconductor manufacturer headquartered in Tokyo, Japan, initially incorporated in 2002 as Renesas Technology, the consolidated entity of the semiconductor units of Hitachi and Mitsubishi excluding their dynamic random-access memory (DRAM) businesses, to which NEC Electronics merged in 2010, resulting in a minor change in the corporate name and logo to as it is now.
In the 2000s to early 2010s, Renesas had been one of the six largest semiconductor companies in the world.
Ranked 16th in semiconductor company sales in 2023, Renesas holds the 2nd highest sales in Japan as of 2024. In the automotive MCU market share rankings, Renesas ranked second, following Infineon Technologies (as of 2024). In the overall MCU market share rankings, it ranks third, following NXP Semiconductors and Infineon Technologies (as of 2024).
The brand Renesas is a contraction of "Renaissance Semiconductor for Advanced Solutions".
== History ==
Renesas Electronics started operation in April 2010, through the integration of NEC Electronics, established in November 2002 as a spin-off of the semiconductor operations of NEC with the exception of the DRAM business, and Renesas Technology established on April 1, 2003, the non-DRAM chip joint venture of Hitachi and Mitsubishi, with their ownership percentage of 55 and 45 in order. The DRAM businesses of the three had become part of Elpida Memory, which went bankrupt in 2012 before being acquired by Micron Technology.
A basic agreement to merge was reached by April 2010 and materialized on the first day, forming the fourth largest semiconductor company by revenue according to an estimation from iSuppli.
In December 2010, Renesas Mobile Corporation (RMC) was created by integrating the Mobile Multimedia Business Unit of Renesas with the acquired Nokia Wireless Modem Business Unit.
In 2011, Renesas Electronics was adversely affected by the 2011 Tōhoku earthquake and tsunami and flooding in Thailand. In 2012, the company, which had about 50 thousand employees of manufacturing, design and sales operations in about 20 countries in 2011, decided to restructure its business, including the sale and consolidation of its Japanese domestic plants, to become profitable. In December 2012, INCJ, a Japanese public-private fund, and several key clients decided to invest in the company. Through the investment, Renesas aimed to secure 150 billion yen as fresh capital by September 2013 and make use of it for investment in development of the microcontroller and analog and power chips for automotive and industrial uses, plant improvements, and corporate acquisitions.
In January 2013, Renesas transferred some of its back-end plants to J-Devices.
In September 2013, Broadcom acquired most of Renesas Mobile Communication.
With the allotment of third-party shares to the nine investors completed in September 2013, INCJ became the largest shareholder in the company. Renesas announced its new business direction and issued its corporate presentation titled "Reforming Renesas” in October 2013.
In the fiscal year ended in March 2014, Renesas recorded its first ever net profit since it started operation as Renesas Electronics Corporation in 2010.
In July 2014, the subsidiary Renesas Mobile Communication was consolidated, after the company had decided to withdraw from the 4G wireless business.
In September 2014, the sale of the display driver IC unit of Renesas to Synaptics was completed.
In September 2016, Renesas announced that it would acquire Intersil for $3.2 billion. In February 2017, Renesas completed the acquisition.
In April 2017, Renesas unveiled a self-driving concept car at a global developer conference, stating that it will start delivering a new line of products for self-driving cars in December 2017, as it takes on global giants such as Intel. The new technology acts as an onboard nerve center, coordinating and controlling vehicle functions.
In September 2018, Renesas announced that it has agreed to buy Integrated Device Technology for $6.7 billion. The acquisition was completed in March 2019.
In 2020, Renesas announced its plans to wind down its production of diodes and the compound device.
In February 2021, Renesas announced that it has agreed to buy Dialog Semiconductor for $5.9 billion. The acquisition was completed in September 2021.
In March 2021, a fire at the Naka Factory owned by a subsidiary of Renesas caused significant damage to equipment. On April 17, 2022, Renesas restarted its production at the Naka Factory.
In August 2021, Renesas completed the acquisition of Dialog Semiconductor Plc.
In December 2021, Renesas also completed the acquisition of Celeno Communications.
In May 2022 Renesas announced the re-opening of its "Kofu" Fab which will utilize the 300mm geometry for the fabrication of power semiconductors. The facility is scheduled to be online in 2024.
In July 2022, Renesas completed the acquisition of Reality Analytics, Inc., adding additional resources for machine learning and artificial intelligence.
In October 2022, Renesas completed the acquisition of Steradian Semiconductors Private Limited, a fabless semiconductor company.
In September 2022, Renesas signed a strategic partnership with VinFast from Vietnam to announce expanding agreement of automotive technology development of electric vehicles (EVs) and delivery of system components.
In December 2022, Renesas won the 2022 “Outstanding Asia-Pacific Semiconductor Company Award” by Global Semiconductor Alliance.
In April 2023, Renesas was included in the 225 stocks that compose the Nikkei Stock Average.
In June 2023, Renesas completed the acquisition of Panthronics AG, an Austrian fabless semiconductor company specializing in high-performance wireless products.
In July 2023, Renesas announced a 10-year silicon carbide wafer supply agreement with Wolfspeed.
In January 2024, Renesas agreed to acquire gallium nitride-chip maker Transphorm for $339 million.
In February 2024, Renesas announced that it had reached an agreement to buy printed circuit board design software company Altium for $5.9 billion.
In June 2024, Renesas announced that it completed the acquisition of Transphorm.
In August 2024, Renesas announced that it completed the acquisition of printed circuit board design software company Altium.
=== Microcontrollers ===
==== The RL78 MCU family ====
RL78 is the family name for a range of 16-bit microcontrollers. These were the first new MCU to emerge from the new Renesas Electronics company after the merger of NEC Electronics and Renesas Technology. These Microcontrollers incorporate the core features of the NEC 78K0R (150 nm MF2 flash process) and many familiar peripherals from legacy Renesas R8C microcontrollers. The RL78 core variants include the S1, S2, and S3 type cores which evolved from the NEC 78K0R core. The basic S1 core support 74 instructions, the S2 core adds register banking and supports 75 instructions, while the S3 core adds an on-chip multiplier / divider / multiple-accumulate and supports 81 instructions.
The RL78 was developed to address extremely low power but highly integrated microcontroller applications, to this end the core offered a novel low power mode of operation called “snooze mode” where the ADC or serial interface can be programmed to meet specific conditions to wake the device from the extreme low power STOP mode of 0.52uA.
==== The RX MCU family ====
The RX, an acronym for Renesas Xtreme, is the family name for a range of 32-bit microcontrollers developed by Renesas, as opposed to the H family and the MC family, launched by Hitachi and Mitsubishi respectively.
The RX family was launched in 2009 by Renesas Technology with the first product range designated the RX600 series and targeting applications such as metering, motor control, human–machine interfaces (HMI), networking, and industrial automation. Since 2009 this MCU family range has been enlarged with a smaller variant the RX200 series and also through enhanced performance versions.
==== The RA MCU family ====
The RA, an acronym for Renesas Advanced, is the family name for a range of 32-bit microcontrollers with Arm Cortex processor cores. The RA family's key features are the stronger embedded security, high-performance, and CoreMark ultra-low power operation. It also has a comprehensive partner ecosystem and Flexible Software Package for the users.
=== Microprocessors ===
==== The RZ Arm-based 32 & 64-bit family ====
The Renesas RZ family is a high-end 32 & 64 bit microprocessors that is designed for the implementations of high resolution human machine interface (HMI), embedded vision, real-time control, and industrial Ethernet connectivity. It supports 6 protocols: PROFINET RT/IRT, EtherNET/IP, POWERLINK, Modbus/TCP, EtherCAT, TSN, and Sercos III.
The family includes, RZ/A and RZ/G for HMI, RZ/T for high-speed real-time control, and RZ/N for the network.
== Corporate affairs ==
The largest stockholders and their ownership ratio of Renesas are as follows as of June 30, 2022.
At the beginning of June 2022, Renesas announced its completion of an approx. 200 billion yen worth buyback of its shares.
At the end of September 2013, Renesas issued new shares through third-party allotment resulting in INCJ becoming the new largest shareholder and non-parental controlling shareholder.
In early May 2012, NEC transferred part of its stake in Renesas to its employee pension trust. As a result, the NEC pension fund held 32.4 percent of Renesas while NEC had 3.0 percent.
=== Corporate responsibility ===
In March 2008, Renesas Electronics signed the UN Global Compact.
In August 2024, the companies ESG risk rating was low at just 17.5%.
Renesas' plans to reduce greenhouse gas emissions by 38% by 2030 compared to 2021 levels have been certified by the Science Based Targets Initiative (SBTi). The company aims to become carbon-neutral by 2050 in order to minimize the impact of climate change.
== Manufacturing sites ==
As of 2022, the in-house wafer fabrication of the semiconductor device is conducted by Renesas Electronics and Renesas Semiconductor Manufacturing, a wholly owned subsidiary, operating five front-end plants in the following areas:
Naka, Takasaki, Saijo, Kawashiri, Palm Bay
The back-end facilities, directly affiliated to Renesas Electronics and its subsidiaries, are located in:
Yonezawa, Oita, Nishiki, Beijing, Suzhou, Kuala Lumpur, Penang
In May 2022 Renesas announced the re-opening of the "Kofu" fab, which will utilize the 300mm geometry for the fabrication of power semiconductors. The facility is scheduled to be online in 2024.
== References ==
== External links ==
Official website | Wikipedia/RX_Microcontroller_Family |
AVR is a family of microcontrollers developed since 1996 by Atmel, acquired by Microchip Technology in 2016. They are 8-bit RISC single-chip microcontrollers based on a modified Harvard architecture. AVR was one of the first microcontroller families to use on-chip flash memory for program storage, as opposed to one-time programmable ROM, EPROM, or EEPROM used by other microcontrollers at the time.
AVR microcontrollers are used numerously as embedded systems. They are especially common in hobbyist and educational embedded applications, popularized by their inclusion in many of the Arduino line of open hardware development boards.
The AVR 8-bit microcontroller architecture was introduced in 1997. By 2003, Atmel had shipped 500 million AVR flash microcontrollers.
== History ==
The AVR architecture was conceived by two students at the Norwegian Institute of Technology (NTH), Alf-Egil Bogen and Vegard Wollan.
Atmel says that the name AVR is not an acronym and does not stand for anything in particular. The creators of the AVR give no definitive answer as to what the term "AVR" stands for. However, it is commonly accepted that AVR stands for Alf and Vegard's RISC processor. Note that the use of "AVR" in this article generally refers to the 8-bit RISC line of Atmel AVR microcontrollers.
The original AVR MCU was developed at a local ASIC house in Trondheim, Norway, called Nordic VLSI at the time, now Nordic Semiconductor, where Bogen and Wollan were working as students. It was known as a μRISC (Micro RISC) and was available as silicon IP/building block from Nordic VLSI. When the technology was sold to Atmel from Nordic VLSI, the internal architecture was further developed by Bogen and Wollan at Atmel Norway, a subsidiary of Atmel. The designers worked closely with compiler writers at IAR Systems to ensure that the AVR instruction set provided efficient compilation of high-level languages.
Among the first of the AVR line was the AT90S8515, which in a 40-pin DIP package has the same pinout as an 8051 microcontroller, including the external multiplexed address and data bus. The polarity of the RESET line was opposite (8051's having an active-high RESET, while the AVR has an active-low RESET), but other than that the pinout was identical.
The Arduino platform, developed for simple electronics projects, was released in 2005 and featured ATmega8 AVR microcontrollers.
== Device overview ==
The AVR is a modified Harvard architecture machine, where program and data are stored in separate physical memory systems that appear in different address spaces, but having the ability to read data items from program memory using special instructions.
=== Basic families ===
AVRs are generally classified into following:
tinyAVR – the ATtiny series
The ATtiny series features small package microcontrollers with a limited peripheral set available. However, the improved tinyAVR 0/1/2-series (released in 2016) include:
Peripherals equal to or exceed megaAVR 0-series
Event System
Improved AVRxt instruction set (improved timing of calls), hardware multiply
megaAVR – the ATmega series
The ATmega series features microcontrollers that provide an extended instruction set (multiply instructions and instructions for handling larger program memories), an extensive peripheral set, a solid amount of program memory, as well as a wide range of pins available. The megaAVR 0-series (released in 2016) also has functionality such as:
Event system
New peripherals with enhanced functionality
Improved AVRxt instruction set (improved timing of calls)
AVR Dx – The AVR Dx family features multiple microcontroller series, focused on HCI, analog signal conditioning and functional safety.
The parts numbers is formatted as AVRffDxpp, where ff is flash size, x is family, and pp is number of pins. Example: AVR128DA64 – 64-pin DA-series with 128k flash. All devices in the AVR Dx family include:
an Async Type D timer that can run faster than the CPU
12-bit ADC
10-bit DAC
AVR DA-series (early 2020) – The high memory density makes these MCUs well suited for both wired and wireless communication-stack-intensive functions.
integrated sensors for capacitative touch measurement (HCI)
updated core independent peripherals (CIPs) and analog peripherals
no external high frequency crystal
AVR DB-series (mid-late 2020) – inherits many features from the DA-family, while adding its own:
2 or 3 on-chip opamps
MultiVoltage IO (MVIO) on PORTC
Supports external HF crystal
AVR DD-series
16–64 KiB Flash
2–8 KiB SRAM
14–32-pin package
internal 24 MHz oscillator
7–23-channel 130 kS/s 12-bit differential Analog-to-Digital Converter (ADC)
no amplifiers
1 analog comparator
Two USARTs, one SPI, one dual-mode TWI
Multi-Voltage Input/Output (MVIO) support on 3 or 4 pins on Port C
4 Configurable Custom Logic (CCL) cells, 6 Event System channels
AVR EA-series
8–64 KiB Flash
28–48-pin package
internal 20 MHz oscillator
24–32-channel 130 kS/s 12-bit differential Analog-to-Digital Converter (ADC)
Programmable Gain Amplifier (PGA) with up to 16x gain
2 analog comparators
Three USARTs, one SPI, one dual-mode TWI
no Multi-Voltage Input/Output (MVIO)
4 Configurable Custom Logic (CCL) cells, 6 Event System channels
XMEGA
the ATxmega series offers a wide variety of peripherals and functionality such as:
Extended performance features, such as DMA, "Event System", and cryptography support
Extensive peripheral set with ADCs
Application-specific AVR
megaAVRs with special features not found on the other members of the AVR family, such as LCD controller, USB controller, advanced PWM, CAN, etc.
FPSLIC (AVR with FPGA)
FPGA 5k to 40k gates
SRAM for the AVR program code, unlike all other AVRs
AVR core can run at up to 50 MHz
32-bit AVRs
In 2006, Atmel released microcontrollers based on the 32-bit AVR32 architecture. This was a completely different architecture unrelated to the 8-bit AVR, intended to compete with the ARM-based processors. It had a 32-bit data path, SIMD and DSP instructions, along with other audio- and video-processing features. The instruction set was similar to other RISC cores, but it was not compatible with the original AVR (nor any of the various ARM cores). Since then support for AVR32 has been dropped from Linux as of kernel 4.12; compiler support for the architecture in GCC was never mainlined into the compiler's central source-code repository and was available primarily in a vendor-supported fork. At the time that AVR32 was introduced, Atmel had already been a licensee of the ARM architecture, with both ARM7 and ARM9 microcontrollers having been released prior to and concurrently with the AVR32; later Atmel focused most development effort on 32-bit chips with ARM Cortex-M and Cortex-A cores.
=== Device architecture ===
The AVRs have 32 single-byte registers and are classified as 8-bit RISC devices.
Flash, EEPROM, and SRAM are all integrated onto a single chip, removing the need for external memory in most applications. Some devices have a parallel external bus option to allow adding additional data memory or memory-mapped devices. Almost all devices (except the smallest TinyAVR chips) have serial interfaces, which can be used to connect larger serial EEPROMs or flash chips.
==== Program memory ====
Program instructions are stored in non-volatile flash memory. Although the MCUs are 8-bit, each instruction takes one or two 16-bit words. The size of the program memory is usually indicated in the naming of the device itself (e.g., the ATmega64x line has 64 KB of flash, while the ATmega32x line has 32 KB). There is no provision for off-chip program memory; all code executed by the AVR core must reside in the on-chip flash. However, this limitation does not apply to the AT94 FPSLIC AVR/FPGA chips.
==== Internal data memory ====
The data address space consists of the register file, I/O registers, and SRAM. Some small models also map the program ROM into the data address space, but larger models do not.
==== Internal registers ====
In the tinyAVR and megaAVR variants of the AVR architecture, the working registers are mapped in as the first 32 data memory addresses (000016–001F16), followed by 64 I/O registers (002016–005F16). In devices with many peripherals, these registers are followed by 160 “extended I/O” registers, only accessible as memory-mapped I/O (006016–00FF16).
Actual SRAM starts after these register sections, at address 006016 or, in devices with "extended I/O", at 010016.
Even though there are separate addressing schemes and optimized opcodes for accessing the register file and the first 64 I/O registers, all can also be addressed and manipulated as if they were in SRAM.
The very smallest of the tinyAVR variants use a reduced architecture with only 16 registers (r0 through r15 are omitted) which are not addressable as memory locations. I/O memory begins at address 000016, followed by SRAM. In addition, these devices have slight deviations from the standard AVR instruction set. Most notably, the direct load/store instructions (LDS/STS) have been reduced from 2 words (32 bits) to 1 word (16 bits), limiting the total direct addressable memory (the sum of both I/O and SRAM) to 128 bytes. Conversely, the indirect load instruction's (LD) 16-bit address space is expanded to also include non-volatile memory such as Flash and configuration bits; therefore, the Load Program Memory (LPM) instruction is unnecessary and omitted. (For detailed info, see Atmel AVR instruction set.)
In the XMEGA variant, the working register file is not mapped into the data address space; as such, it is not possible to treat any of the XMEGA's working registers as though they were SRAM. Instead, the I/O registers are mapped into the data address space starting at the very beginning of the address space. Additionally, the amount of data address space dedicated to I/O registers has grown substantially to 4096 bytes (000016–0FFF16). As with previous generations, however, the fast I/O manipulation instructions can only reach the first 64 I/O register locations (the first 32 locations for bitwise instructions). Following the I/O registers, the XMEGA series sets aside a 4096 byte range of the data address space, which can be used optionally for mapping the internal EEPROM to the data address space (100016–1FFF16). The actual SRAM is located after these ranges, starting at 200016.
==== General-purpose input/output (GPIO) ports ====
Each GPIO port on a tiny or mega AVR drives up to eight pins and is controlled by three 8-bit registers: DDRx, PORTx and PINx, where x is the port identifier.
DDRx: Data Direction Register, configures the pins as either inputs or outputs.
PORTx: Output port register. Sets the output value on pins configured as outputs. Enables or disables the pull-up resistor on pins configured as inputs.
PINx: Input register, used to read an input signal. On some devices, this register can be used for pin toggling: writing a logic one to a PINx bit toggles the corresponding bit in PORTx, irrespective of the setting of the DDRx bit.
Newer ATtiny AVRs, like ATtiny817 and its siblings, have their port control registers somewhat differently defined.
xmegaAVR have additional registers for push/pull, totem-pole and pullup configurations.
==== EEPROM ====
Almost all AVR microcontrollers have internal EEPROM for semi-permanent data storage. Like flash memory, EEPROM can maintain its contents when electrical power is removed.
In most variants of the AVR architecture, this internal EEPROM memory is not mapped into the MCU's addressable memory space. It can only be accessed the same way an external peripheral device is, using special pointer registers and read/write instructions, which makes EEPROM access much slower than other internal RAM.
However, some devices in the SecureAVR (AT90SC) family use a special EEPROM mapping to the data or program memory, depending on the configuration. The XMEGA family also allows the EEPROM to be mapped into the data address space.
Since the number of writes to EEPROM is limited – Atmel specifies 100,000 write cycles in their datasheets – a well designed EEPROM write routine should compare the contents of an EEPROM address with desired contents and only perform an actual write if the contents need to be changed.
=== Program execution ===
Atmel's AVRs have a two-stage, single-level pipeline design, meaning that the next machine instruction is fetched as the current one is executing. Most instructions take just one or two clock cycles, making AVRs relatively fast among eight-bit microcontrollers.
The AVR processors were designed with the efficient execution of compiled C code in mind and have several built-in pointers for the task.
=== Instruction set ===
The AVR instruction set is more orthogonal than those of most eight-bit microcontrollers, in particular the 8051 clones and PIC microcontrollers with which AVR has competed. However, it is not completely regular:
Pointer registers X, Y, and Z have addressing capabilities that are different from each other.
Register locations R0 to R15 have more limited addressing capabilities than register locations R16 to R31.
I/O ports 0 to 31 can be bit addressed, unlike I/O ports 32 to 63.
CLR (clear all bits to zero) affects flags, while SER (set all bits to one) does not, even though they are complementary instructions. (CLR is pseudo-op for EOR R, R; while SER is short for LDI R,$FF. Arithmetic operations such as EOR modify flags, while moves/loads/stores/branches such as LDI do not.)
Accessing read-only data stored in the program memory (flash) requires special LPM instructions; the flash bus is otherwise reserved for instruction memory.
Some chip-specific differences affect code generation. Code pointers (including return addresses on the stack) are two bytes long on chips with up to 128 KB of flash memory, but three bytes long on larger chips; not all chips have hardware multipliers; chips with over 8 KB of flash have branch and call instructions with longer ranges; and so forth.
The mostly regular instruction set makes C (and even Ada) compilers fairly straightforward and efficient. GCC has included AVR support for quite some time, and that support is widely used. LLVM also has rudimentary AVR support. In fact, Atmel solicited input from major developers of compilers for small microcontrollers, to determine the instruction set features that were most useful in a compiler for high-level languages.
=== MCU speed ===
The AVR line can normally support clock speeds from 0 to 20 MHz, with some devices reaching 32 MHz. Lower-powered operation usually requires a reduced clock speed. All recent (Tiny, Mega, and Xmega, but not 90S) AVRs feature an on-chip oscillator, removing the need for external clocks or resonator circuitry. Some AVRs also have a system clock prescaler that can divide down the system clock by up to 1024. This prescaler can be reconfigured by software during run-time, allowing the clock speed to be optimized.
Since all operations (excluding multiplication and 16-bit add/subtract) on registers R0–R31 are single-cycle, the AVR can achieve up to 1 MIPS per MHz, i.e. an 8 MHz processor can achieve up to 8 MIPS. Loads and stores to/from memory take two cycles, branching takes two cycles. Branches in the latest "3-byte PC" parts such as ATmega2560 are one cycle slower than on previous devices.
=== Development ===
AVRs have a large following due to the free and inexpensive development tools available, including reasonably priced development boards and free development software. The AVRs are sold under various names that share the same basic core, but with different peripheral and memory combinations. Compatibility between chips in each family is fairly good, although I/O controller features may vary.
See external links for sites relating to AVR development.
=== Features ===
AVRs offer a wide range of features:
Multifunction, bi-directional general-purpose I/O ports with configurable, built-in pull-up resistors
Multiple internal oscillators, including RC oscillator without external parts
Internal, self-programmable instruction flash memory up to 256 KB (384 KB on XMega)
In-system programmable using serial/parallel low-voltage proprietary interfaces or JTAG
Optional boot code section with independent lock bits for protection
On-chip debugging (OCD) support through JTAG or debugWIRE on most devices
The JTAG signals (TMS, TDI, TDO, and TCK) are multiplexed on GPIOs. These pins can be configured to function as JTAG or GPIO depending on the setting of a fuse bit, which can be programmed via in-system programming (ISP) or HVSP. By default, AVRs with JTAG come with the JTAG interface enabled.
debugWIRE uses the /RESET pin as a bi-directional communication channel to access on-chip debug circuitry. It is present on devices with lower pin counts, as it only requires one pin.
Internal data EEPROM up to 4 KB
Internal SRAM up to 16 KB (32 KB on XMega)
External 64 KB little endian data space on certain models, including the Mega8515 and Mega162.
The external data space is overlaid with the internal data space, such that the full 64 KB address space does not appear on the external bus and accesses to e.g. address 010016 will access internal RAM, not the external bus.
In certain members of the XMega series, the external data space has been enhanced to support both SRAM and SDRAM. As well, the data addressing modes have been expanded to allow up to 16 MB of data memory to be directly addressed.
8-bit and 16-bit timers
PWM output (some devices have an enhanced PWM peripheral which includes a dead-time generator)
Input capture that record a time stamp triggered by a signal edge
analog comparator
10 or 12-bit A/D converters, with multiplex of up to 16 channels
12-bit D/A converters
A variety of serial interfaces, including
I²C compatible Two-Wire Interface (TWI)
Synchronous/asynchronous serial peripherals (UART/USART) (used with RS-232, RS-485, and more)
Serial Peripheral Interface Bus (SPI)
Universal Serial Interface (USI): a multi-purpose hardware communication module that can be used to implement an SPI, I2C or UART interface.
Brownout detection
Watchdog timer (WDT)
Multiple power-saving sleep modes
Lighting and motor control (PWM-specific) controller models
CAN controller support
USB controller support
Proper full-speed (12 Mbit/s) hardware & Hub controller with embedded AVR.
Also freely available low-speed (1.5 Mbit/s) (HID) bitbanging software emulations
Ethernet controller support
LCD controller support
Low-voltage devices operating down to 1.8 V (to 0.7 V for parts with built-in DC–DC upconverter)
picoPower devices
DMA controllers and "event system" peripheral communication.
Fast cryptography support for AES and DES
== Programming interfaces ==
There are many means to load program code into an AVR chip. The methods to program AVR chips varies from AVR family to family. Most of the methods described below use the RESET line to enter programming mode. In order to avoid the chip accidentally entering such mode, it is advised to connect a pull-up resistor between the RESET pin and the positive power supply.
=== ISP ===
The in-system programming (ISP) programming method is functionally performed through SPI, plus some twiddling of the Reset line. As long as the SPI pins of the AVR are not connected to anything disruptive, the AVR chip can stay soldered on a PCB while reprogramming. All that is needed is a 6-pin connector and programming adapter. This is the most common way to develop with an AVR.
The Atmel-ICE device or AVRISP mkII (Legacy device) connects to a computer's USB port and performs in-system programming using Atmel's software.
AVRDUDE (AVR Downloader/UploaDEr) runs on Linux, FreeBSD, Windows, and Mac OS X, and supports a variety of in-system programming hardware, including Atmel AVRISP mkII, Atmel JTAG ICE, older Atmel serial-port based programmers, and various third-party and "do-it-yourself" programmers.
=== PDI ===
The Program and Debug Interface (PDI) is an Atmel proprietary interface for external programming and on-chip debugging of XMEGA devices. The PDI supports high-speed programming of all non-volatile memory (NVM) spaces; flash, EEPROM, fuses, lock-bits and the User Signature Row. This is done by accessing the XMEGA NVM controller through the PDI interface, and executing NVM controller commands. The PDI is a 2-pin interface using the Reset pin for clock input (PDI_CLK) and a dedicated data pin (PDI_DATA) for input and output.
=== UPDI ===
The Unified Program and Debug Interface (UPDI) is a one-wire interface for external programming and on-chip debugging of newer ATtiny and ATmega devices. UPDI chips can be programmed by an Atmel-ICE, a PICkit 4, an Arduino (flashed with jtag2updi), or though a UART (with a 1 kΩ resistor between the TX and RX pins) controlled by Microchip's Python utility pymcuprog.
=== High-voltage serial ===
High-voltage serial programming (HVSP) is mostly the backup mode on smaller AVRs. An 8-pin AVR package does not leave many unique signal combinations to place the AVR into a programming mode. A 12-volt signal, however, is something the AVR should only see during programming and never during normal operation. The high voltage mode can also be used in some devices where the reset pin was disabled by fuses.
=== High-voltage parallel ===
High-voltage parallel programming (HVPP) is considered the "final resort" and may be the only way to correct bad fuse settings on an AVR chip.
=== Bootloader ===
Most AVR models can reserve a bootloader region, 256 bytes to 4 KB, where re-programming code can reside. At reset, the bootloader runs first and does some user-programmed determination whether to re-program or to jump to the main application. The code can re-program through any interface available, or it could read an encrypted binary through an Ethernet adapter like PXE. Atmel has application notes and code pertaining to many bus interfaces.
=== ROM ===
The AT90SC series of AVRs are available with a factory mask-ROM for program memory, instead of flash. Because of the large up-front cost and minimum order quantity, a mask-ROM is only cost-effective for high-production runs.
=== aWire ===
aWire is a new one-wire debug interface available on the new UC3L AVR32 devices.
== Debugging interfaces ==
The AVR offers several options for debugging, mostly involving on-chip debugging while the chip is in the target system.
=== debugWIRE ===
debugWIRE is Atmel's solution for providing on-chip debug capabilities via a single microcontroller pin. It is useful for lower pin-count parts which cannot provide the four "spare" pins needed for JTAG. The JTAGICE mkII, mkIII and the AVR Dragon support debugWIRE. debugWIRE was developed after the original JTAGICE release, and now clones support it.
=== JTAG ===
The Joint Test Action Group (JTAG) feature provides access to on-chip debugging functionality while the chip is running in the target system. JTAG allows accessing internal memory and registers, setting breakpoints on code, and single-stepping execution to observe system behaviour.
Atmel provides a series of JTAG adapters for the AVR:
The Atmel-ICE is the latest adapter. It supports JTAG, debugWire, aWire, SPI, TPI, and PDI interfaces.
The JTAGICE 3 is a midrange debugger in the JTAGICE family (JTAGICE mkIII). It supports JTAG, aWire, SPI, and PDI interfaces.
The JTAGICE mkII replaces the JTAGICE and is similarly priced. The JTAGICE mkII interfaces to the PC via USB, and supports both JTAG and the newer debugWIRE interface. Numerous third-party clones of the Atmel JTAGICE mkII device started shipping after Atmel released the communication protocol.
The AVR Dragon is a low-cost (approximately $50) substitute for the JTAGICE mkII for certain target parts. The AVR Dragon provides in-system serial programming, high-voltage serial programming and parallel programming, as well as JTAG or debugWIRE emulation for parts with 32 KB of program memory or less. ATMEL changed the debugging feature of AVR Dragon with the latest firmware of AVR Studio 4 – AVR Studio 5 and now it supports devices over 32 KB of program memory.
The JTAGICE adapter interfaces to the PC via a standard serial port. Although the JTAGICE adapter has been declared "end-of-life" by Atmel, it is still supported in AVR Studio and other tools.
JTAG can also be used to perform a boundary scan test, which tests the electrical connections between AVRs and other boundary scan capable chips in a system. Boundary scan is well-suited for a production line, while the hobbyist is probably better off testing with a multimeter or oscilloscope.
== Development tools and evaluation kits ==
Official Atmel AVR development tools and evaluation kits contain a number of starter kits and debugging tools with support for most AVR devices:
=== STK600 starter kit ===
The STK600 starter kit and development system is an update to the STK500. The STK600 uses a base board, a signal routing board, and a target board.
The base board is similar to the STK500, in that it provides a power supply, clock, in-system programming, an RS-232 port and a CAN (Controller Area Network, an automotive standard) port via DE9 connectors, and stake pins for all of the GPIO signals from the target device.
The target boards have ZIF sockets for DIP, SOIC, QFN, or QFP packages, depending on the board.
The signal routing board sits between the base board and the target board, and routes the signals to the proper pin on the device board. There are many different signal routing boards that could be used with a single target board, depending on what device is in the ZIF socket.
The STK600 allows in-system programming from the PC via USB, leaving the RS-232 port available for the target microcontroller. A 4 pin header on the STK600 labeled 'RS-232 spare' can connect any TTL level USART port on the chip to an onboard MAX232 chip to translate the signals to RS-232 levels. The RS-232 signals are connected to the RX, TX, CTS, and RTS pins on the DB-9 connector.
=== STK500 starter kit ===
The STK500 starter kit and development system features ISP and high voltage programming (HVP) for all AVR devices, either directly or through extension boards. The board is fitted with DIP sockets for all AVRs available in DIP packages.
STK500 Expansion Modules:
Several expansion modules are available for the STK500 board:
STK501 – Adds support for microcontrollers in 64-pin TQFP packages.
STK502 – Adds support for LCD AVRs in 64-pin TQFP packages.
STK503 – Adds support for microcontrollers in 100-pin TQFP packages.
STK504 – Adds support for LCD AVRs in 100-pin TQFP packages.
STK505 – Adds support for 14 and 20-pin AVRs.
STK520 – Adds support for 14 and 20, and 32-pin microcontrollers from the AT90PWM and ATmega family.
STK524 – Adds support for the ATmega32M1/C1 32-pin CAN/LIN/Motor Control family.
STK525 – Adds support for the AT90USB microcontrollers in 64-pin TQFP packages.
STK526 – Adds support for the AT90USB microcontrollers in 32-pin TQFP packages.
=== STK200 starter kit ===
The STK200 starter kit and development system has a DIP socket that can host an AVR chip in a 40, 20, or 8-pin package. The board has a 4 MHz clock source, 8 light-emitting diode (LED)s, 8 input buttons, an RS-232 port, a socket for a 32 KB SRAM and numerous general I/O. The chip can be programmed with a dongle connected to the parallel port.
=== Atmel-ICE ===
The Atmel ICE is the currently supported inexpensive tool to program and debug all AVR devices (unlike the AVRISP/AVRISP mkII, Dragon, etc. discussed below). It connects to and receives power from a PC via USB, and supports JTAG, PDI, aWire, debugWIRE, SPI, SWD, TPI, and UPDI (the Microchip Unified Program and Debug Interface) interfaces.
The ICE can program and debug all AVRs via the JTAG interface, and program with additional interfaces as supported on each device:
8-bit AVR XMEGA devices via the PDI 2-wire interface
8-bit megaAVR and tinyAVR devices via SPI for all with OCD (on-chip debugger) support
8-bit tinyAVR microcontrollers with TPI support
32-bit SAM Arm Cortex-M based microcontrollers via SWD
Target operating voltage ranges of 1.62V to 5.5V are supported as well as the following clock ranges:
Supports JTAG & PDI clock frequencies from 32 kHz to 7.5 MHz
Supports aWire baud rates from 7.5 kbit/s to 7 Mbit/s
Supports debugWIRE baud rates from 4 kbit/s to 0.5 Mbit/s
Supports SPI clock frequencies from 8 kHz to 5 MHz
Supports SWD clock frequencies from 32 kHz to 2 MHz
The ICE is supported by the Microchip Studio IDE, as well as a command line interface (atprogram).
The Atmel-ICE supports a limited implementation of the Data Gateway Interface (DGI) when debugging and programming features are not in use. The Data Gateway Interface is an interface for streaming data from a target device to the connected computer. This is meant as a useful adjunct to the unit to allow for demonstration of application features and as an aid in application level debugging.
=== AVRISP and AVRISP mkII ===
The AVRISP and AVRISP mkII are inexpensive tools allowing all AVRs to be programmed via ICSP.
The AVRISP connects to a PC via a serial port and draws power from the target system. The AVRISP allows using either of the "standard" ICSP pinouts, either the 10-pin or 6-pin connector.
The AVRISP mkII connects to a PC via USB and draws power from USB. LEDs visible through the translucent case indicate the state of target power.
As the AVRISP mkII lacks driver/buffer ICs, it can have trouble programming target boards with multiple loads on its SPI lines. In such occurrences, a programmer capable of sourcing greater current is required. Alternatively, the AVRISP mkII can still be used if low-value (~150 ohm) load-limiting resistors can be placed on the SPI lines before each peripheral device.
Both the AVRISP and the AVRISP mkII are now discontinued, with product pages removed from the Microchip website. As of July 2019 the AVRISP mkII is still in stock at a number of distributors. There are also a number of 3rd party clones available.
=== AVR Dragon ===
The Atmel Dragon is an inexpensive tool which connects to a PC via USB. The Dragon can program all AVRs via JTAG, HVP, PDI, or ICSP. The Dragon also allows debugging of all AVRs via JTAG, PDI, or debugWire; a previous limitation to devices with 32 KB or less program memory has been removed in AVR Studio 4.18. The Dragon has a small prototype area which can accommodate an 8, 28, or 40-pin AVR, including connections to power and programming pins. There is no area for any additional circuitry, although this can be provided by a third-party product called the "Dragon Rider".
=== JTAGICE ===
The JTAG In Circuit Emulator (JTAGICE) debugging tool supports on-chip debugging (OCD) of AVRs with a JTAG interface. The original JTAGICE (sometimes retroactively referred to as JTAGICE mkI) uses an RS-232 interface to a PC and can only program AVRs with a JTAG interface. The JTAGICE mkI is no longer in production, however it has been replaced by the JTAGICE mkII.
=== JTAGICE mkII ===
The JTAGICE mkII debugging tool supports on-chip debugging (OCD) of AVRs with SPI, JTAG, PDI, and debugWIRE interfaces. The debugWire interface enables debugging using only one pin (the Reset pin), allowing debugging of applications running on low pin-count microcontrollers.
The JTAGICE mkII connects using USB, but there is an alternate connection via a serial port, which requires using a separate power supply. In addition to JTAG, the mkII supports ISP programming (using 6-pin or 10-pin adapters). Both the USB and serial links use a variant of the STK500 protocol.
=== JTAGICE3 ===
The JTAGICE3 updates the mkII with more advanced debugging capabilities and faster programming. It connects via USB and supports the JTAG, aWire, SPI, and PDI interfaces. The kit includes several adapters for use with most interface pinouts.
=== AVR ONE! ===
The AVR ONE! is a professional development tool for all Atmel 8-bit and 32-bit AVR devices with On-Chip Debug capability. It supports SPI, JTAG, PDI, and aWire programming modes and debugging using debugWIRE, JTAG, PDI, and aWire interfaces.
=== Butterfly demonstration board ===
The very popular AVR Butterfly demonstration board is a self-contained, battery-powered computer running the Atmel AVR ATmega169V microcontroller. It was built to show off the AVR family, especially a then new built-in LCD interface. The board includes the LCD screen, joystick, speaker, serial port, real time clock (RTC), flash memory chip, and both temperature and voltage sensors. Earlier versions of the AVR Butterfly also contained a CdS photoresistor; it is not present on Butterfly boards produced after June 2006 to allow RoHS compliance. The small board has a shirt pin on its back so it can be worn as a name badge.
The AVR Butterfly comes preloaded with software to demonstrate the capabilities of the microcontroller. Factory firmware can scroll your name, display the sensor readings, and show the time. The AVR Butterfly also has a piezoelectric transducer that can be used to reproduce sounds and music.
The AVR Butterfly demonstrates LCD driving by running a 14-segment, six alpha-numeric character display. However, the LCD interface consumes many of the I/O pins.
The Butterfly's ATmega169 CPU is capable of speeds up to 8 MHz, but it is factory set by software to 2 MHz to preserve the button battery life. A pre-installed bootloader program allows the board to be re-programmed via a standard RS-232 serial plug with new programs that users can write with the free Atmel IDE tools.
=== AT90USBKey ===
This small board, about half the size of a business card, is priced at slightly more than an AVR Butterfly. It includes an AT90USB1287 with USB On-The-Go (OTG) support, 16 MB of DataFlash, LEDs, a small joystick, and a temperature sensor. The board includes software, which lets it act as a USB mass storage device (its documentation is shipped on the DataFlash), a USB joystick, and more. To support the USB host capability, it must be operated from a battery, but when running as a USB peripheral, it only needs the power provided over USB.
Only the JTAG port uses conventional 2.54 mm pinout. All the other AVR I/O ports require more compact 1.27 mm headers.
The AVR Dragon can both program and debug since the 32 KB limitation was removed in AVR Studio 4.18, and the JTAGICE mkII is capable of both programming and debugging the processor. The processor can also be programmed through USB from a Windows or Linux host, using the USB "Device Firmware Update" protocols. Atmel ships proprietary (source code included but distribution restricted) example programs and a USB protocol stack with the device.
LUFA is a third-party free software (MIT license) USB protocol stack for the USBKey and other 8-bit USB AVRs.
=== Raven wireless kit ===
The RAVEN kit supports wireless development using Atmel's IEEE 802.15.4 chipsets, for Zigbee and other wireless stacks. It resembles a pair of wireless more-powerful Butterfly cards, plus a wireless USBKey; and costing about that much (under $US100). All these boards support JTAG-based development.
The kit includes two AVR Raven boards, each with a 2.4 GHz transceiver supporting IEEE 802.15.4 (and a freely licensed Zigbee stack). The radios are driven with ATmega1284p processors, which are supported by a custom segmented LCD driven by an ATmega3290p processor. Raven peripherals resemble the Butterfly: piezo speaker, DataFlash (bigger), external EEPROM, sensors, 32 kHz crystal for RTC, and so on. These are intended for use in developing remote sensor nodes, to control relays, or whatever is needed.
The USB stick uses an AT90USB1287 for connections to a USB host and to the 2.4 GHz wireless links. These are intended to monitor and control the remote nodes, relying on host power rather than local batteries.
=== Third-party programmers ===
A wide variety of third-party programming and debugging tools are available for the AVR. These devices use various interfaces, including RS-232, PC parallel port, and USB.
== Uses ==
AVRs have been used in various automotive applications such as security, safety, powertrain and entertainment systems. Atmel has recently launched a new publication "Atmel Automotive Compilation" to help developers with automotive applications. Some current usages are in BMW, Daimler-Chrysler and TRW.
The Arduino physical computing platform is based on an ATmega328 microcontroller (ATmega168 or ATmega8 in board versions older than the Diecimila). The ATmega1280 and ATmega2560, with more pinout and memory capabilities, have also been employed to develop the Arduino Mega platform. Arduino boards can be used with its language and IDE, or with more conventional programming environments (C, assembler, etc.) as just standardized and widely available AVR platforms.
USB-based AVRs have been used in the Microsoft Xbox hand controllers. The link between the controllers and Xbox is USB.
Numerous companies produce AVR-based microcontroller boards intended for use by hobbyists, robot builders, experimenters and small system developers including: Cubloc, gnusb, BasicX, Oak Micros, ZX Microcontrollers, and myAVR. There is also a large community of Arduino-compatible boards supporting similar users.
Schneider Electric used to produce the M3000 Motor and Motion Control Chip, incorporating an Atmel AVR Core and an advanced motion controller for use in a variety of motion applications but this has been discontinued.
== FPGA clones ==
With the growing popularity of FPGAs among the open source community, people have started developing open source processors compatible with the AVR instruction set. The OpenCores website lists the following major AVR clone projects:
pAVR, written in VHDL, is aimed at creating the fastest and maximally featured AVR processor, by implementing techniques not found in the original AVR processor such as deeper pipelining.
avr_core, written in VHDL, is a clone aimed at being as close as possible to the ATmega103.
Navré, written in Verilog, implements all Classic Core instructions and is aimed at high performance and low resource usage. It does not support interrupts.
softavrcore, written in Verilog, implements the AVR instruction set up to AVR5, supports interrupts along with optional automatic interrupt acknowledgement, power saving via sleep mode plus some peripheral interfaces and hardware accelerators (such as UART, SPI, cyclic redundancy check calculation unit and system timers). These peripherals demonstrate how could these be attached to and configured for this core. Within the package, a full-featured FreeRTOS port is also available as an example for the core + peripheral utilization.
The opencores project CPU lecture written in VHDL by Dr. Jürgen Sauermann explains in detail how to design a complete AVR-based system on a chip (SoC).
== Other vendors ==
In addition to the chips manufactured by Atmel, clones are available from LogicGreen Technologies. These parts are not exact clones – they have a few features not found in the chips they are "clones" of, and higher maximum clock speeds, but use SWD (Serial Wire Debug, a variant of JTAG from ARM) instead of ISP for programming, so different programming tools must be used.
Microcontrollers using the ATmega architecture are being manufactured by NIIET in Voronezh, Russia, as part of the 1887 series of integrated circuits. This includes an ATmega128 under the designation 1887VE7T (Russian: 1887ВЕ7Т).
== References ==
== Further reading ==
Williams, Elliot (2014). AVR Programming: Learning to Write Software for Hardware. Maker Media. ISBN 978-1449355784.
Schmidt, Maik (2011). Arduino: A Quick Start Guide. Pragmatic Bookshelf. ISBN 978-1-934356-66-1.
Margush, Timothy S. (2011). Some Assembly Required: Assembly Language Programming with the AVR Microcontroller. CRC Press. ISBN 978-1439820643.
Mazidi, Muhammad Ali; Naimi, Sarmad; Naimi, Sepehr (2010). AVR Microcontroller and Embedded Systems: Using Assembly and C. Pearson. ISBN 978-0138003319.
== External links ==
Official Website
Atmel AVR
Official Community
AVR Freaks community
Microchip Forum
Pinout Diagrams
AVR DIP-Packages: ATtiny44/45/84/85, ATmega328P, ATmega644P, ATmega1284P
AVR SMD-Packages: ATmega328, ATmega2560, ATmega32U4
Simulators
AVR8js (8-bit in-browser simulator) | Wikipedia/AVR_microcontrollers |
Consumer Electronics Control (CEC) is a feature of HDMI designed to control HDMI connected devices by using only one remote controller; individual CEC enabled devices can command and control each other without user intervention, for up to 15 devices.: §CEC-3.1 For example, a TV remote can also control a digital video recorder and a Blu-ray player.
It is a single-wire bidirectional serial bus that is based on the CENELEC standard AV.link protocol to perform remote control functions. CEC wiring is mandatory, although implementation of CEC in a product is optional.: §8.1 It was defined in HDMI Specification 1.0 and updated in HDMI 1.2, HDMI 1.2a and HDMI 1.3a (which added timer and audio commands to the bus).: §§CEC-1.2,CEC-1.3,CEC-3.1,CEC-5 USB-to-CEC adapters exist that allow a computer to control CEC-enabled devices.
== Trade names for CEC technology ==
Trade names for CEC include:
== CEC commands ==
The following is a list of the most commonly used HDMI-CEC commands:
One Touch Play allows devices to switch the TV to use it as the active source when playback starts
System Standby enables users to switch multiple devices to standby mode with the press of one button
Preset Transfer transfers the tuner channel setup to another TV set
One Touch Record allows users to record whatever is currently being shown on the HDTV screen on a selected recording device
Timer Programming allows users to use the electronic program guides (EPGs) that are built into many HDTVs and set-top-boxes to program the timer in recording devices like PVRs and DVRs
System Information checks all components for bus addresses and configuration
Deck Control allows a component to interrogate and control the operation (play, pause, rewind etc.), of a playback component (Blu-ray or HD DVD player or a Camcorder, etc.)
Tuner Control allows a component to control the tuner of another component
OSD Display uses the on-screen display (OSD) of the TV set to display text
Device Menu Control allows a component to control the menu system of another component by passing through the user interface (UI) commands
Routing Control controls the switching of signal sources
Remote Control Pass Through allows remote control commands to be passed through to other devices within the system
Device OSD Name Transfer transfers the preferred device names to the TV set
System Audio Control allows the volume of an AV receiver, integrated amplifier or preamplifier to be controlled using any remote control from a suitably equipped device(s) in the system
== Protocol ==
CEC is a separate electrical signal from the other HDMI signals. This allows a device to disable its high-speed HDMI circuitry in sleep mode, but be woken up by CEC. It is a single shared bus, which is directly connected between all HDMI ports on a device, so it can flow through a device which is completely powered off (not just asleep).
The bus is electrically identical to the AV.link protocol, but CEC adds a detailed higher-level message protocol.
The bus is an open-collector line, somewhat like I²C, passively pulled up to +3.3 V, and driven low to transmit a bit.
Similarities to I²C include:
Low-speed serial bus
Open-collector with passive pull-up
Speed limited by distributed capacitance
Receiver can convert a transmitted 1 bit to a 0
Multiple masters allowed via arbitration: sending a 1 bit and observing a 0 indicates loss
Byte-oriented protocol
Each byte has an acknowledge bit appended
Special start signal
Differences from I²C:
Single wire rather than two wires
Bits sent with fixed timing rather than separate clock
1000× lower speed (417 bit/s instead of 400 kbit/s)
Four address bits rather than seven
Defined protocol for dynamic address allocation
Header includes both initiator and recipient address
No special stop signal; instead, each byte has an end of message flag appended
No "read" operations; all data bytes in a frame are sent from transmitter
Instead, "get" requests solicit response frames
Every device must be able to transmit
Detailed specification of meaning of bytes after the address
Each bit begins with the line pulled low (falling edge), a delay indicating the bit value, a rising edge, and further delay until the start of the following bit.
Normal data bits are 2.4±0.35 ms long. A logic 1 is held low for 0.6±0.2 ms, while a logic 0 is held low for 1.5±0.2 ms. The receiver samples the line at 1.05±0.2 ms after the falling edge, then begins watching for the following bit 1.9±0.15 ms after the falling edge.
A receiver can convert a transmitted 1 bit to a 0 bit by pulling the line low within 0.35 ms of the falling edge, and holding it until the 0 bit time. The transmitter observes the bus during its own transmissions to detect this condition. This is used to acknowledge a transmission.
Each frame begins with a special start bit, held low for 3.7±0.2 ms and then allowed to rise, for a total duration of 4.5±0.2 ms. Any device may send a start bit after observing the bus idle for a suitable number of bit times. (Normally, 5 bit times, but 7 bit times immediately after a successful transmission to facilitate fair sharing of the bus, and 3 bit times between a failed transmission and its retransmission.)
This is followed by up to 16 bytes. Each byte consists of ten bits: eight data bits (transmitted msbit-first, in big-endian order), an "end of message" bit (set to 1 after the last byte of a frame), and an "acknowledge" bit.
For single-recipient messages, the acknowledge bit operates similarly to I²C: it is transmitted as a 1 bit, and the receiver pulls it down to a 0 bit to acknowledge the byte.
For broadcast messages, the acknowledge bit is inverted: it is still transmitted as a 1 bit, but is pulled down to a 0 bit by any receiver which rejects the byte.
The first byte of each CEC frame is a header containing the 4-bit source and destination addresses. If the addressed destination exists, it acknowledges the byte. A frame consisting of nothing but the header is a ping which simply checks for the presence of another device.
The address 15 (1111) is used for the broadcast address (as a destination) and unregistered devices (as a source) which have not yet chosen a different address. Some devices do not need to receive non-broadcast messages and so may use address 15 permanently, notably remote control receivers and HDMI switches. Devices which need to receive addressed messages need their own address. A device obtains an address by attempting to ping it. If the ping is unacknowledged, the device claims it. If the ping is acknowledged, the device tries another address.
The second byte is an opcode which specifies the operation to be performed, and the number and meaning of following parameter bytes. For example, a user press on a remote control will generate a 3-byte frame: a header byte, a <User Control Pressed> opcode (0x44), and an operand byte identifying the button. Including the initial idle time and extra-long start bit, this takes 88.5 ms (37 bit times). A later <User Control Released> opcode (0x45) has no operands.
== See also ==
Consumer IR
Media controls
== References ==
== External links ==
"HDMI.org FAQ entry for CEC". Archived from the original on 2017-06-15.
USB CEC adapter communication library | Wikipedia/Consumer_Electronics_Control |
Renesas Electronics Corporation (ルネサス エレクトロニクス株式会社, Runesasu Erekutoronikusu Kabushiki Gaisha) is a Japanese semiconductor manufacturer headquartered in Tokyo, Japan, initially incorporated in 2002 as Renesas Technology, the consolidated entity of the semiconductor units of Hitachi and Mitsubishi excluding their dynamic random-access memory (DRAM) businesses, to which NEC Electronics merged in 2010, resulting in a minor change in the corporate name and logo to as it is now.
In the 2000s to early 2010s, Renesas had been one of the six largest semiconductor companies in the world.
Ranked 16th in semiconductor company sales in 2023, Renesas holds the 2nd highest sales in Japan as of 2024. In the automotive MCU market share rankings, Renesas ranked second, following Infineon Technologies (as of 2024). In the overall MCU market share rankings, it ranks third, following NXP Semiconductors and Infineon Technologies (as of 2024).
The brand Renesas is a contraction of "Renaissance Semiconductor for Advanced Solutions".
== History ==
Renesas Electronics started operation in April 2010, through the integration of NEC Electronics, established in November 2002 as a spin-off of the semiconductor operations of NEC with the exception of the DRAM business, and Renesas Technology established on April 1, 2003, the non-DRAM chip joint venture of Hitachi and Mitsubishi, with their ownership percentage of 55 and 45 in order. The DRAM businesses of the three had become part of Elpida Memory, which went bankrupt in 2012 before being acquired by Micron Technology.
A basic agreement to merge was reached by April 2010 and materialized on the first day, forming the fourth largest semiconductor company by revenue according to an estimation from iSuppli.
In December 2010, Renesas Mobile Corporation (RMC) was created by integrating the Mobile Multimedia Business Unit of Renesas with the acquired Nokia Wireless Modem Business Unit.
In 2011, Renesas Electronics was adversely affected by the 2011 Tōhoku earthquake and tsunami and flooding in Thailand. In 2012, the company, which had about 50 thousand employees of manufacturing, design and sales operations in about 20 countries in 2011, decided to restructure its business, including the sale and consolidation of its Japanese domestic plants, to become profitable. In December 2012, INCJ, a Japanese public-private fund, and several key clients decided to invest in the company. Through the investment, Renesas aimed to secure 150 billion yen as fresh capital by September 2013 and make use of it for investment in development of the microcontroller and analog and power chips for automotive and industrial uses, plant improvements, and corporate acquisitions.
In January 2013, Renesas transferred some of its back-end plants to J-Devices.
In September 2013, Broadcom acquired most of Renesas Mobile Communication.
With the allotment of third-party shares to the nine investors completed in September 2013, INCJ became the largest shareholder in the company. Renesas announced its new business direction and issued its corporate presentation titled "Reforming Renesas” in October 2013.
In the fiscal year ended in March 2014, Renesas recorded its first ever net profit since it started operation as Renesas Electronics Corporation in 2010.
In July 2014, the subsidiary Renesas Mobile Communication was consolidated, after the company had decided to withdraw from the 4G wireless business.
In September 2014, the sale of the display driver IC unit of Renesas to Synaptics was completed.
In September 2016, Renesas announced that it would acquire Intersil for $3.2 billion. In February 2017, Renesas completed the acquisition.
In April 2017, Renesas unveiled a self-driving concept car at a global developer conference, stating that it will start delivering a new line of products for self-driving cars in December 2017, as it takes on global giants such as Intel. The new technology acts as an onboard nerve center, coordinating and controlling vehicle functions.
In September 2018, Renesas announced that it has agreed to buy Integrated Device Technology for $6.7 billion. The acquisition was completed in March 2019.
In 2020, Renesas announced its plans to wind down its production of diodes and the compound device.
In February 2021, Renesas announced that it has agreed to buy Dialog Semiconductor for $5.9 billion. The acquisition was completed in September 2021.
In March 2021, a fire at the Naka Factory owned by a subsidiary of Renesas caused significant damage to equipment. On April 17, 2022, Renesas restarted its production at the Naka Factory.
In August 2021, Renesas completed the acquisition of Dialog Semiconductor Plc.
In December 2021, Renesas also completed the acquisition of Celeno Communications.
In May 2022 Renesas announced the re-opening of its "Kofu" Fab which will utilize the 300mm geometry for the fabrication of power semiconductors. The facility is scheduled to be online in 2024.
In July 2022, Renesas completed the acquisition of Reality Analytics, Inc., adding additional resources for machine learning and artificial intelligence.
In October 2022, Renesas completed the acquisition of Steradian Semiconductors Private Limited, a fabless semiconductor company.
In September 2022, Renesas signed a strategic partnership with VinFast from Vietnam to announce expanding agreement of automotive technology development of electric vehicles (EVs) and delivery of system components.
In December 2022, Renesas won the 2022 “Outstanding Asia-Pacific Semiconductor Company Award” by Global Semiconductor Alliance.
In April 2023, Renesas was included in the 225 stocks that compose the Nikkei Stock Average.
In June 2023, Renesas completed the acquisition of Panthronics AG, an Austrian fabless semiconductor company specializing in high-performance wireless products.
In July 2023, Renesas announced a 10-year silicon carbide wafer supply agreement with Wolfspeed.
In January 2024, Renesas agreed to acquire gallium nitride-chip maker Transphorm for $339 million.
In February 2024, Renesas announced that it had reached an agreement to buy printed circuit board design software company Altium for $5.9 billion.
In June 2024, Renesas announced that it completed the acquisition of Transphorm.
In August 2024, Renesas announced that it completed the acquisition of printed circuit board design software company Altium.
=== Microcontrollers ===
==== The RL78 MCU family ====
RL78 is the family name for a range of 16-bit microcontrollers. These were the first new MCU to emerge from the new Renesas Electronics company after the merger of NEC Electronics and Renesas Technology. These Microcontrollers incorporate the core features of the NEC 78K0R (150 nm MF2 flash process) and many familiar peripherals from legacy Renesas R8C microcontrollers. The RL78 core variants include the S1, S2, and S3 type cores which evolved from the NEC 78K0R core. The basic S1 core support 74 instructions, the S2 core adds register banking and supports 75 instructions, while the S3 core adds an on-chip multiplier / divider / multiple-accumulate and supports 81 instructions.
The RL78 was developed to address extremely low power but highly integrated microcontroller applications, to this end the core offered a novel low power mode of operation called “snooze mode” where the ADC or serial interface can be programmed to meet specific conditions to wake the device from the extreme low power STOP mode of 0.52uA.
==== The RX MCU family ====
The RX, an acronym for Renesas Xtreme, is the family name for a range of 32-bit microcontrollers developed by Renesas, as opposed to the H family and the MC family, launched by Hitachi and Mitsubishi respectively.
The RX family was launched in 2009 by Renesas Technology with the first product range designated the RX600 series and targeting applications such as metering, motor control, human–machine interfaces (HMI), networking, and industrial automation. Since 2009 this MCU family range has been enlarged with a smaller variant the RX200 series and also through enhanced performance versions.
==== The RA MCU family ====
The RA, an acronym for Renesas Advanced, is the family name for a range of 32-bit microcontrollers with Arm Cortex processor cores. The RA family's key features are the stronger embedded security, high-performance, and CoreMark ultra-low power operation. It also has a comprehensive partner ecosystem and Flexible Software Package for the users.
=== Microprocessors ===
==== The RZ Arm-based 32 & 64-bit family ====
The Renesas RZ family is a high-end 32 & 64 bit microprocessors that is designed for the implementations of high resolution human machine interface (HMI), embedded vision, real-time control, and industrial Ethernet connectivity. It supports 6 protocols: PROFINET RT/IRT, EtherNET/IP, POWERLINK, Modbus/TCP, EtherCAT, TSN, and Sercos III.
The family includes, RZ/A and RZ/G for HMI, RZ/T for high-speed real-time control, and RZ/N for the network.
== Corporate affairs ==
The largest stockholders and their ownership ratio of Renesas are as follows as of June 30, 2022.
At the beginning of June 2022, Renesas announced its completion of an approx. 200 billion yen worth buyback of its shares.
At the end of September 2013, Renesas issued new shares through third-party allotment resulting in INCJ becoming the new largest shareholder and non-parental controlling shareholder.
In early May 2012, NEC transferred part of its stake in Renesas to its employee pension trust. As a result, the NEC pension fund held 32.4 percent of Renesas while NEC had 3.0 percent.
=== Corporate responsibility ===
In March 2008, Renesas Electronics signed the UN Global Compact.
In August 2024, the companies ESG risk rating was low at just 17.5%.
Renesas' plans to reduce greenhouse gas emissions by 38% by 2030 compared to 2021 levels have been certified by the Science Based Targets Initiative (SBTi). The company aims to become carbon-neutral by 2050 in order to minimize the impact of climate change.
== Manufacturing sites ==
As of 2022, the in-house wafer fabrication of the semiconductor device is conducted by Renesas Electronics and Renesas Semiconductor Manufacturing, a wholly owned subsidiary, operating five front-end plants in the following areas:
Naka, Takasaki, Saijo, Kawashiri, Palm Bay
The back-end facilities, directly affiliated to Renesas Electronics and its subsidiaries, are located in:
Yonezawa, Oita, Nishiki, Beijing, Suzhou, Kuala Lumpur, Penang
In May 2022 Renesas announced the re-opening of the "Kofu" fab, which will utilize the 300mm geometry for the fabrication of power semiconductors. The facility is scheduled to be online in 2024.
== References ==
== External links ==
Official website | Wikipedia/RX_microcontroller_family |
PIC (usually pronounced as /pɪk/) is a family of microcontrollers made by Microchip Technology, derived from the PIC1640 originally developed by General Instrument's Microelectronics Division. The name PIC initially referred to Peripheral Interface Controller, and was subsequently expanded for a short time to include Programmable Intelligent Computer, though the name PIC is no longer used as an acronym for any term.
The first parts of the family were available in 1976; by 2013 the company had shipped more than twelve billion individual parts, used in a wide variety of embedded systems.
The PIC was originally designed as a peripheral for the General Instrument CP1600, the first commercially available single-chip 16-bit microprocessor. To limit the number of pins required, the CP1600 had a complex highly-multiplexed bus which was difficult to interface with, so in addition to a variety of special-purpose peripherals, General Instrument made the programmable PIC1640 as an all-purpose peripheral. With its own small RAM, ROM and a simple CPU for controlling the transfers, it could connect the CP1600 bus to virtually any existing 8-bit peripheral. While this offered considerable power, GI's marketing was limited and the CP1600 was not a success. However, GI had also made the PIC1650, a standalone PIC1640 with additional general-purpose I/O in place of the CP1600 interface. When the company spun off their chip division to form Microchip in 1985, sales of the CP1600 were all but dead, but the PIC1650 and successors had formed a major market of their own, and they became one of the new company's primary products.
Early models only had mask ROM for code storage, but with its spinoff it was soon upgraded to use EPROM and then EEPROM, which made it possible for end-users to program the devices in their own facilities. All current models use flash memory for program storage, and newer models allow the PIC to reprogram itself. Since then the line has seen significant change; memory is now available in 8-bit, 16-bit, and, in latest models, 32-bit wide. Program instructions vary in bit-count by family of PIC, and may be 12, 14, 16, or 24 bits long. The instruction set also varies by model, with more powerful chips adding instructions for digital signal processing functions. The hardware implementations of PIC devices range from 6-pin SMD, 8-pin DIP chips up to 144-pin SMD chips, with discrete I/O pins, ADC and DAC modules, and communications ports such as UART, I2C, CAN, and even USB. Low-power and high-speed variations exist for many types.
The manufacturer supplies computer software for development known as MPLAB X, assemblers and C/C++ compilers, and programmer/debugger hardware under the MPLAB and PICKit series. Third party and some open-source tools are also available. Some parts have in-circuit programming capability; low-cost development programmers are available as well as high-volume production programmers.
PIC devices are popular with both industrial developers and hobbyists due to their low cost, wide availability, large user base, an extensive collection of application notes, availability of low cost or free development tools, serial programming, and re-programmable flash-memory capability.
== History ==
=== Original concept ===
The original PIC was intended to be used with General Instrument's new CP1600 16-bit central processing unit (CPU). In order to fit 16-bit data and address buses into a then-standard 40-pin dual inline package (DIP) chip, the two buses shared the same set of 16 connection pins. In order to communicate with the CPU, devices had to watch other pins on the CPU to determine if the information on the bus was an address or data. Since only one of these was being presented at a time, the devices had to watch the bus to go into address mode, see if that address was part of its memory mapped input/output range, "latch" that address and then wait for the data mode to turn on and then read the value. Additionally, the CP1600 used several external pins to select which device it was attempting to talk to, further complicating the interfacing.
As interfacing devices to the CP1600 could be complex, GI also released the 164x series of support chips with all of the required circuitry built-in. These included keyboard drivers, cassette deck interfaces for storage, and a host of similar systems. For more complex systems, GI introduced the 1640 "Programmable Interface Controller" in 1975. The idea was that a device would use the PIC to handle all the interfacing with the host computer's CP1600, but also use its own internal processor to handle the actual device it was connected to. For instance, a floppy disk drive could be implemented with a PIC talking to the CPU on one side and the floppy disk controller on the other. In keeping with this idea, what would today be known as a microcontroller, the PIC included a small amount of read-only memory (ROM) that would be written with the user's device controller code, and a separate random access memory (RAM) for buffering and working with data. These were connected separately, making the PIC a Harvard architecture system with code and data being stored and managed on separate internal pathways.
In theory, the combination of CP1600 CPU and PIC1640 device controllers provided a very high-performance device control system, one that was similar in power and performance to the channel I/O controllers seen on mainframe computers. In the floppy controller example, for instance, a single PIC could control the drive, provide a reasonable amount of buffering to improve performance, and then transfer data to and from the host computer using direct memory access (DMA) or through relatively simple code in the CPU. The downside to this approach was cost; while the PIC was not necessary for low-speed devices like a keyboard, many tasks would require one or more PICs to build out a complete system.
While the design concept had a number of attractive features, General Instrument never strongly marketed the CP1600, preferring to deal only with large customers and ignoring the low-end market. This resulted in very little uptake of the system, with the Intellivision being the only really widespread use with about three million units. However, GI had introduced a standalone model PIC1650 in 1976, designed for use without a CP1600. Although not as powerful as the Intel MCS-48 introduced the same year, it was cheaper, and it found a market. Follow-ons included the PIC1670, with instructions widened from 12 to 13 bits to provide twice the address space (64 bytes of RAM and 1024 words of ROM). When GI spun off its chip division to form Microchip Technology in 1985, production of the CP1600 ended. By this time, however, the PIC1650 had developed a large market of customers using it for a wide variety of roles, and the PIC went on to become one of the new company's primary products.
=== After the CP1600 ===
In 1985, General Instrument sold their microelectronics division and the new owners cancelled almost everything which by this time was mostly out-of-date. The PIC, however, was upgraded with an internal EPROM to produce a programmable channel I/O controller.
At the same time Plessey in the UK released NMOS processors numbered PIC1650 and PIC1655 based on the GI design, using the same instruction sets, either user mask programmable or versions pre-programmed for auto-diallers and keyboard interfaces.
In 1998 Microchip introduced the PIC16F84, a flash programmable and erasable version of its successful serial programmable PIC16C84.
In 2001, Microchip introduced more flash programmable devices, with full production commencing in 2002.
Today, a huge variety of PICs are available with various on-board peripherals (serial communication modules, UARTs, motor control kernels, etc.) and program memory from 256 words to 64K words and more. A "word" is one assembly language instruction, varying in length from 8 to 16 bits, depending on the specific PIC microcontroller series.
While PIC and PICmicro are now registered trademarks of Microchip Technology, the prefix ″PIC″ is no longer used as an acronym for any term. It is generally thought that PIC stands for "Programmable Intelligent Computer", General Instruments' prefix in 1977 for the PIC1640 and PIC1650 family of microcomputers, replacing the 1976 original meaning "Programmable Interface Controller" for the PIC1640 that was designed specifically to work in combination with the CP1600 microcomputer. The "PIC Series Microcomputers" by General Instrument were a series of Metal-Oxide Semiconductor Large-Scale Integration (MOS/LSI) 8-bit microcomputers containing ROM, RAM, a CPU, and 8-bit input/output (I/O) registers for interfacing. At its time, this technology combined the advantages of MOS circuits with Large-Scale Integration, allowing for the creation of complex integrated circuits with high transistor density.
The Microchip 16C84 (PIC16x84), introduced in 1993, was the first Microchip CPU with on-chip EEPROM memory.
By 2013, Microchip was shipping over one billion PIC microcontrollers every year.
== Device families ==
PIC micro chips are designed with a Harvard architecture, and are offered in various device families. The baseline and mid-range families use 8-bit wide data memory, and the high-end families use 16-bit data memory. The latest series, PIC32MZ, is a 32-bit MIPS-based microcontroller. Instruction word sizes are 12 bits (PIC10 and PIC12), 14 bits (PIC16) and 24 bits (PIC24 and dsPIC). The binary representations of the machine instructions vary by family and are shown in PIC instruction listings.
Within these families, devices may be designated PICnnCxxx (CMOS) or PICnnFxxx (Flash). "C" devices are generally classified as "Not suitable for new development" (not actively promoted by Microchip). The program memory of "C" devices is variously described as OTP, ROM, or EEPROM. As of October 2016, the only OTP product classified as "In production" is the pic16HV540. "C" devices with quartz windows (for UV erasure) are in general no longer available.
=== PIC10 and PIC12 ===
These devices feature a 12-bit wide code memory, a 32-byte register file, and a tiny two level deep call stack. They are represented by the PIC10 series, as well as by some PIC12 and PIC16 devices. Baseline devices are available in 6-pin to 40-pin packages.
Generally the first 7 to 9 bytes of the register file are special-purpose registers, and the remaining bytes are general purpose RAM. Pointers are implemented using a register pair: after writing an address to the FSR (file select register), the INDF (indirect f) register becomes an alias for the addressed register. If banked RAM is implemented, the bank number is selected by the high 3 bits of the FSR. This affects register numbers 16–31; registers 0–15 are global and not affected by the bank select bits.
Because of the very limited register space (5 bits), 4 rarely read registers were not assigned addresses, but written by special instructions (OPTION and TRIS).
The ROM address space is 512 and may only specify addresses in the first half of each 512-word page. That is, the CALL instruction specifies the low 9 bits of the address, but only the low 8 bits of that address are a parameter of the instruction, while the 9th bit (bit 8) is implicitly specified as 0 by the CALL instruction itself.
Lookup tables are implemented using a computed GOTO (assignment to PCL register) into a table of RETLW instructions. RETLW performs a subroutine return and simultaneously loads the W register with an 8-bit immediate constant that is part of the instruction.
This "baseline core" does not support interrupts; all I/O must be polled. There are some "enhanced baseline" variants with interrupt support and a four-level call stack.
PIC10F32x devices feature a mid-range 14-bit wide code memory of 256 or 512 words, a 64-byte SRAM register file, and an 8-level deep hardware stack. These devices are available in 6-pin SMD and 8-pin DIP packages (with two pins unused). One input only and three I/O pins are available. A complex set of interrupts are available. Clocks are an internal calibrated high-frequency oscillator of 16 MHz with a choice of selectable speeds via software and a 31 kHz low-power source.
=== PIC16 ===
These devices feature a 14-bit wide code memory, and an improved 8-level deep call stack. The instruction set differs very little from the baseline devices, but the two additional opcode bits allow 128 registers and 2048 words of code to be directly addressed. There are a few additional miscellaneous instructions, and two additional 8-bit literal instructions, add and subtract. The mid-range core is available in the majority of devices labeled PIC12 and PIC16.
The first 32 bytes of the register space are allocated to special-purpose registers; the remaining 96 bytes are used for general-purpose RAM. If banked RAM is used, the high 16 registers (0x70–0x7F) are global, as are a few of the most important special-purpose registers, including the STATUS register, which holds the RAM bank select bits. (The other global registers are FSR and INDF, the low 8 bits of the program counter PCL, the PC high preload register PCLATH, and the master interrupt control register INTCON.)
The PCLATH register supplies high-order instruction address bits when the 8 bits supplied by a write to the PCL register, or the 11 bits supplied by a GOTO or CALL instruction, are not sufficient to address the available ROM space.
=== PIC17 ===
The PIC17 series never became popular and has been superseded by the PIC18 architecture (however, see clones below). The PIC17 series is not recommended for new designs, and availability may be limited to users.
Improvements over earlier cores are 16-bit wide opcodes (allowing many new instructions), and a 16-level deep call stack. PIC17 devices were produced in packages from 40 to 68 pins.
The PIC17 series introduced a number of important new features:
a memory mapped accumulator
read access to code memory (table reads)
direct register-to-register moves (prior cores needed to move registers through the accumulator)
an external program memory interface to expand the code space
an 8-bit × 8-bit hardware multiplier
a second indirect register pair
auto-increment/auto-decrement addressing controlled by control bits in a status register (ALUSTA)
A significant limitation was that RAM space was limited to 256 bytes (26 bytes of special function registers, and 232 bytes of general-purpose RAM), with awkward bank-switching in the models that supported more.
=== PIC18 ===
In 2000, Microchip introduced the PIC18 architecture. Unlike the PIC17 series, it has proven to be very popular, with a large number of device variants presently in manufacture. In contrast to earlier devices, which were more often than not programmed in assembly language, C has become the predominant development language.
The PIC18 series inherits most of the features and instructions of the PIC17 series, while adding a number of important new features:
call stack is 21 bits wide and much deeper (31 levels deep)
the call stack may be read and written (TOSU:TOSH:TOSL registers)
conditional branch instructions
indexed addressing mode (PLUSW)
the FSR registers are extended to 12 bits, allowing them to linearly address the entire data address space
the addition of another FSR register (bringing the number up to 3)
The RAM space is 12 bits, addressed using a 4-bit bank select register (BSR) and an 8-bit offset in each instruction. An additional "access" bit in each instruction selects between bank 0 (a=0) and the bank selected by the BSR (a=1).
A 1-level stack is also available for the STATUS, WREG and BSR registers. They are saved on every interrupt, and may be restored on return. If interrupts are disabled, they may also be used on subroutine call/return by setting the s bit (appending ", FAST" to the instruction).
The auto increment/decrement feature was improved by removing the control bits and adding four new indirect registers per FSR. Depending on which indirect file register is being accessed, it is possible to postdecrement, postincrement, or preincrement FSR; or form the effective address by adding W to FSR.
In more advanced PIC18 devices, an "extended mode" is available which makes the addressing even more favorable to compiled code:
a new offset addressing mode; some addresses which were relative to the access bank are now interpreted relative to the FSR2 register
the addition of several new instructions, notably for manipulating the FSR registers.
PIC18 devices are still developed (2021) and fitted with CIP (Core Independent Peripherals)
=== PIC24 and dsPIC ===
In 2001, Microchip introduced the dsPIC series of chips, which entered mass production in late 2004. They are Microchip's first inherently 16-bit microcontrollers. PIC24 devices are designed as general purpose microcontrollers. dsPIC devices include digital signal processing capabilities in addition.
Although still similar to earlier PIC architectures, there are significant enhancements:
All registers are 16 bits wide
Program counter is 22 bits (bits 22:1; bit 0 is always 0)
Instructions are 24 bits wide
Data address space expanded to 64 KiB
First 2 KiB is reserved for peripheral control registers
Data bank switching is not required unless RAM exceeds 62 KiB
"f operand" direct addressing extended to 13 bits (8 KiB)
16 W registers available for register-register operations.(But operations on f operands always reference W0.)
Instructions come in byte and (16-bit) word forms
Stack is in RAM (with W15 as stack pointer); there is no hardware stack
W14 is the frame pointer
Data stored in ROM may be accessed directly ("Program Space Visibility")
Vectored interrupts for different interrupt sources
Some features are:
(16×16)-bit single-cycle multiplication and other digital signal processing operations
hardware multiply–accumulate (MAC)
hardware divide assist (19 cycles for 32/16-bit divide)
barrel shifting - for both accumulators and general purpose registers
bit reversal
hardware support for loop indexing
peripheral direct memory access
dsPICs can be programmed in C using Microchip's XC16 compiler (formerly called C30), which is a variant of GCC.
Instruction ROM is 24 bits wide. Software can access ROM in 16-bit words, where even words hold the least significant 16 bits of each instruction, and odd words hold the most significant 8 bits. The high half of odd words reads as zero. The program counter is 23 bits wide, but the least significant bit is always 0, so there are 22 modifiable bits.
Instructions come in two main varieties, with most important operations (add, xor, shifts, etc.) allowing both forms:
The first is like the classic PIC instructions, with an operation between a specified f register (i.e. the first 8K of RAM) and a single accumulator W0, with a destination select bit selecting which is updated with the result. (The W registers are memory-mapped. so the f operand may be any W register.)
The second form is more conventional, allowing three operands, which may be any of 16 W registers. The destination and one of the sources also support addressing modes, allowing the operand to be in memory pointed to by a W register.
=== PIC32M MIPS-based line ===
Microchip's PIC32M products use the PIC trademark, but have a completely different architecture, and are described here only briefly.
==== PIC32MX ====
In November 2007, Microchip introduced the PIC32MX family of 32-bit microcontrollers, based on the MIPS32 M4K Core. The device can be programmed using the Microchip MPLAB C Compiler for PIC32 MCUs, a variant of the GCC compiler. The first 18 models currently in production (PIC32MX3xx and PIC32MX4xx) are pin to pin compatible and share the same peripherals set with the PIC24FxxGA0xx family of (16-bit) devices, allowing the use of common libraries, software and hardware tools. Today, starting at 28 pin in small QFN packages up to high performance devices with Ethernet, CAN and USB OTG, full family range of mid-range 32-bit microcontrollers are available.
The PIC32 architecture brought a number of new features to Microchip portfolio, including:
The highest execution speed 80 MIPS (120+ Dhrystone MIPS @ 80 MHz)
The largest flash memory: 512 kB
One instruction per clock cycle execution
The first cached processor
Allows execution from RAM
Full Speed Host/Dual Role and OTG USB capabilities
Full JTAG and 2-wire programming and debugging
Real-time trace
==== PIC32MZ ====
In November 2013, Microchip introduced the PIC32MZ series of microcontrollers, based on the MIPS M14K core. The PIC32MZ series include:
252 MHz core speed, 415 DMIPS
Up to 2 MB Flash and 512 KB RAM
New peripherals including high-speed USB, crypto engine and SQI
In 2015, Microchip released the PIC32MZ EF family, using the updated MIPS M5150 Warrior M-class processor.
In 2017, Microchip introduced the PIC32MZ DA Family, featuring an integrated graphics controller, graphics processor and 32MB of DDR2 DRAM.
==== PIC32MM ====
In June 2016, Microchip introduced the PIC32MM family, specialized for low-power and low-cost applications. The PIC32MM features core-independent peripherals, sleep modes down to 500 nA, and 4 x 4 mm packages. The PIC32MM microcontrollers use the MIPS Technologies M4K, a 32-bit MIPS32 processor.
They are meant for very low power consumption and limited to 25 MHz.
Their key advantage is to support the 16-bit instructions of MIPS, making program size much more compact (about 40%)
==== PIC32MK ====
Microchip introduced the PIC32MK family in 2017, specialized for motor control, industrial control, Industrial Internet of Things (IIoT) and multi-channel CAN applications.
=== PIC32C Arm-based line ===
Microchip's PIC32C products also use the PIC trademark, but similarly have a completely different architecture. PIC32C products employ the Arm processor architecture, including various lines using Cortex-M0+, M4, M7, M23, and M33 cores. They are offered in addition to the Arm-based SAM series of MCUs which Microchip inherited from its acquisition of Atmel.
=== PIC64 ===
Microchip's PIC64 products use the PIC trademark, but have a completely different architecture, and are described here only briefly.
In July 2024, Microchip introduced the PIC64 series of high-performance multi-core microprocessors. The series will initially use the RISC-V instruction set, however Microchip is also planning versions with ARM Cortex-A cores. The PIC64 series will include the PIC64GX line, which focuses on intelligent edge applications, and the PIC64-HPSC line, which is radiation-hardened and focuses on spaceflight applications.
== Core architecture ==
The PIC architecture (excluding the unrelated PIC32 and PIC64) is a one-operand accumulator machine like the PDP-8 or the Apollo Guidance Computer. Its characteristics are:
One accumulator (W0), which is an implied operand of almost every instruction.
A small number of fixed-length instructions, with mostly fixed timing (2 clock cycles, or 4 clock cycles in 8-bit models).
A small amount of addressable data space (32, 128, or 256 bytes, depending on the family), extended through banking
Separate code and data spaces (Harvard architecture).
Instruction memory is wider than data memory, allowing immediate constants within an instruction. (This is a major difference from the other early accumulator machines mentioned above.)
The second operand is a memory location or an immediate constant.
There are no other addressing modes, although an indirect address mode can be emulated using the indirect register(s).
Data-space mapped CPU, port, and peripheral registers
ALU status flags are mapped into the data space
The program counter is also mapped into the data space and writeable (this is used to implement indirect jumps).
A hardware stack for storing return addresses
There are only unconditional branch instructions
Conditional execution is achieved via conditional skip instructions, which conditionally nullify the following instruction.
There is no distinction between memory space and register space because the RAM serves the job of both memory and registers, and the RAM is usually just referred to as "the register file" or simply as "the registers".
=== Data space (RAM) ===
PICs have a set of registers that function as general-purpose RAM. Special-purpose control registers for on-chip hardware resources are also mapped into the data space. The addressability of memory varies depending on device series, and all PIC device types have some banking mechanism to extend addressing to additional memory (but some device models have only one bank implemented). Later series of devices feature move instructions, which can cover the whole addressable space, independent of the selected bank. In earlier devices, any register move must be achieved through the accumulator.
To implement indirect addressing, a "file select register" (FSR) and "indirect register" (INDF) are used. A register number is written to the FSR, after which reads from or writes to INDF will actually be from or to the register pointed to by FSR. Later devices extended this concept with post- and pre- increment/decrement for greater efficiency in accessing sequentially stored data. This also allows FSR to be treated almost like a stack pointer (SP).
External data memory is not directly addressable except in some PIC18 devices with high pin count. However, general I/O ports can be used to implement a parallel bus or a serial interface for accessing external memory and other peripherals (using subroutines), with the caveat that such programmed memory access is (of course) much slower than access to the native memory of the PIC MCU.
=== Code space ===
The code space is generally implemented as on-chip ROM, EPROM or flash ROM. In general, there is no provision for storing code in external memory due to the lack of an external memory interface. The exceptions are PIC17 and select high pin count PIC18 devices.
=== Word size ===
All PICs handle (and address) data in 8-bit chunks. However, the unit of addressability of the code space is not generally the same as the data space. For example, PICs in the baseline (PIC12) and mid-range (PIC16) families have program memory addressable in the same wordsize as the instruction width, i.e. 12 or 14 bits respectively. In contrast, in the PIC18 series, the program memory is addressed in 8-bit increments (bytes), which differs from the instruction width of 16 bits.
In order to be clear, the program memory capacity is usually stated in number of (single-word) instructions, rather than in bytes.
=== Stacks ===
PICs have a hardware call stack, which is used to save return addresses. The hardware stack is not software-accessible on earlier devices, but this changed with the PIC18 series devices.
Hardware support for a general-purpose parameter stack was lacking in early series, but this greatly improved in the PIC18 series, making the PIC18 series architecture more friendly to high-level language compilers.
=== Instruction set ===
PIC instruction sets vary from about 35 instructions for the low-end PICs to over 80 instructions for the high-end PICs. The instruction set includes instructions to perform a variety of operations on registers directly, on the accumulator and a literal constant, or on the accumulator and a register, as well as for conditional execution, and program branching.
A few operations, such as bit setting and testing, can be performed on any numbered register, but 2-input arithmetic operations always involve W (the accumulator), writing the result back to either W or the other operand register. To load a constant, it is necessary to load it into W before it can be moved into another register. On the older cores, all register moves needed to pass through W, but this changed on the "high-end" cores.
PIC cores have skip instructions, which are used for conditional execution and branching. The skip instructions are "skip if bit set" and "skip if bit not set". Because cores before PIC18 had only unconditional branch instructions, conditional jumps are implemented by a conditional skip (with the opposite condition) followed by an unconditional branch. Skips are also of utility for conditional execution of any immediate single following instruction. It is possible to skip skip instructions. For example, the instruction sequence "skip if A; skip if B; C" will execute C if A is true or if B is false.
The PIC18 series implemented shadow registers: these are registers which save several important registers during an interrupt, providing hardware support for automatically saving processor state when servicing interrupts.
In general, PIC instructions fall into five classes:
Operation on working register (WREG) with 8-bit immediate ("literal") operand. E.g. movlw (move literal to WREG), andlw (AND literal with WREG). One instruction peculiar to the PIC is retlw, load immediate into WREG and return, which is used with computed branches to produce lookup tables.
Operation with WREG and indexed register. The result can be written to either the working register (e.g. addwf reg,w). or the selected register (e.g. addwf reg,f).
Bit operations. These take a register number and a bit number, and perform one of 4 actions: set or clear a bit, and test and skip on set/clear. The latter are used to perform conditional branches. The usual ALU status flags are available in a numbered register so operations such as "branch on carry clear" are possible.
Control transfers. Other than the skip instructions previously mentioned, there are only two: goto and call.
A few miscellaneous zero-operand instructions, such as return from subroutine, and sleep to enter low-power mode.
=== Performance ===
The architectural decisions are directed at the maximization of speed-to-cost ratio. The PIC architecture was among the first scalar CPU designs and is still among the simplest and cheapest. The Harvard architecture, in which instructions and data come from separate sources, simplifies timing and microcircuit design greatly, and this benefits clock speed, price, and power consumption.
The PIC instruction set is suited to implementation of fast lookup tables in the program space. Such lookups take one instruction and two instruction cycles. Many functions can be modeled in this way. Optimization is facilitated by the relatively large program space of the PIC (e.g. 4096 × 14-bit words on the 16F690) and by the design of the instruction set, which allows embedded constants. For example, a branch instruction's target may be indexed by W, and execute a "RETLW", which does as it is named – return with literal in W.
Interrupt latency is constant at three instruction cycles. External interrupts have to be synchronized with the four-clock instruction cycle, otherwise there can be a one instruction cycle jitter. Internal interrupts are already synchronized. The constant interrupt latency allows PICs to achieve interrupt-driven low-jitter timing sequences. An example of this is a video sync pulse generator. This is no longer true in the newest PIC models, because they have a synchronous interrupt latency of three or four cycles.
=== Advantages ===
Small instruction set to learn
RISC architecture
Built-in oscillator with selectable speeds
Easy entry level, in-circuit programming plus in-circuit debugging PICkit units available for less than $50
Inexpensive microcontrollers
Wide range of interfaces including I²C, SPI, USB, UART, A/D, programmable comparators, PWM, LIN, CAN, PSP, and Ethernet
Availability of processors in DIL package makes them easy to handle for hobby use.
=== Limitations ===
One accumulator
Register-bank switching is required to access the entire RAM of many devices
Operations and registers are not orthogonal; some instructions can address RAM and/or immediate constants, while others can use the accumulator only.
The following stack limitations have been addressed in the PIC18 series, but still apply to earlier cores:
The hardware call stack is not addressable, so preemptive task switching cannot be implemented
Software-implemented stacks are not efficient, so it is difficult to generate reentrant code and support local variables
With paged program memory, there are two page sizes to worry about: one for CALL and GOTO and another for computed GOTO (typically used for table lookups). For example, on PIC16, CALL and GOTO have 11 bits of addressing, so the page size is 2048 instruction words. For computed GOTOs, where you add to PCL, the page size is 256 instruction words. In both cases, the upper address bits are provided by the PCLATH register. This register must be changed every time control transfers between pages. PCLATH must also be preserved by any interrupt handler.
=== Compiler development ===
While several commercial compilers are available, in 2008, Microchip released their own C compilers, C18 and C30, for the line of 18F 24F and 30/33F processors.
As of 2013, Microchip offers their XC series of compilers, for use with MPLAB X. Microchip will eventually phase out its older compilers, such as C18, and recommends using their XC series compilers for new designs.
The RISC instruction set of the PIC assembly language code can make the overall flow difficult to comprehend. Judicious use of simple macros can increase the readability of PIC assembly language. For example, the original Parallax PIC assembler ("SPASM") has macros, which hide W and make the PIC look like a two-address machine. It has macro instructions like mov b, a (move the data from address a to address b) and add b, a (add data from address a to data in address b). It also hides the skip instructions by providing three-operand branch macro instructions, such as cjne a, b, dest (compare a with b and jump to dest if they are not equal).
== Hardware features ==
PIC devices generally feature:
Flash memory (program memory, programmed using MPLAB devices)
SRAM (data memory)
EEPROM (programmable at run-time)
Sleep mode (power savings)
Watchdog timer
Various crystal or RC oscillator configurations, or an external clock
=== Variants ===
Within a series, there are still many device variants depending on what hardware resources the chip features:
General purpose I/O pins
Internal clock oscillators
8/16/32 bit timers
Synchronous/Asynchronous Serial Interface USART
MSSP Peripheral for I²C and SPI communications
Capture/Compare and PWM modules
Analog-to-digital converters (up to ~1.0 Msps)
USB, Ethernet, CAN interfacing support
External memory interface
Integrated analog RF front ends (PIC16F639, and rfPIC).
KEELOQ Rolling code encryption peripheral (encode/decode)
And many more
=== Trends ===
The first generation of PICs with EPROM storage have been almost completely replaced by chips with flash memory. Likewise, the original 12-bit instruction set of the PIC1650 and its direct descendants has been superseded by 14-bit and 16-bit instruction sets. Microchip still sells OTP (one-time-programmable) and windowed (UV-erasable) versions of some of its EPROM based PICs for legacy support or volume orders. The Microchip website lists PICs that are not electrically erasable as OTP. UV erasable windowed versions of these chips can be ordered.
=== Part number ===
The F in a PICMicro part number generally indicates the PICmicro uses flash memory and can be erased electronically. Conversely, a C generally means it can only be erased by exposing the die to ultraviolet light (which is only possible if a windowed package style is used). An exception to this rule is the PIC16C84, which uses EEPROM and is therefore electrically erasable.
An L in the name indicates the part will run at a lower voltage, often with frequency limits imposed. Parts designed specifically for low voltage operation, within a strict range of 3 – 3.6 volts, are marked with a J in the part number. These parts are also uniquely I/O tolerant as they will accept up to 5 V as inputs.
== Development tools ==
Microchip provides a freeware IDE package called MPLAB X, which includes an assembler, linker, software simulator, and debugger. They also sell C compilers for the PIC10, PIC12, PIC16, PIC18, PIC24, PIC32 and dsPIC, which integrate cleanly with MPLAB X. Free versions of the C compilers are also available with all features. But for the free versions, optimizations will be disabled after 60 days.
Several third parties develop C language compilers for PICs, many of which integrate to MPLAB and/or feature their own IDE. A fully featured compiler for the PICBASIC language to program PIC microcontrollers is available from meLabs, Inc. Mikroelektronika offers PIC compilers in C, BASIC and Pascal programming languages.
A graphical programming language, Flowcode, exists capable of programming 8- and 16-bit PIC devices and generating PIC-compatible C code. It exists in numerous versions from a free demonstration to a more complete professional edition.
The Proteus Design Suite is able to simulate many of the popular 8 and 16-bit PIC devices along with other circuitry that is connected to the PIC on the schematic. The program to be simulated can be developed within Proteus itself, MPLAB or any other development tool.
== Device programmers ==
Devices called "programmers" are traditionally used to get program code into the target PIC. Most PICs that Microchip currently sells feature ICSP (in-circuit serial programming) and/or LVP (low-voltage programming) capabilities, allowing the PIC to be programmed while it is sitting in the target circuit.
Microchip offers programmers/debuggers under the MPLAB and PICKit series. MPLAB ICD5 and MPLAB REAL ICE are the current programmers and debuggers for professional engineering, while PICKit 5 is a low-cost programmer / debugger line for hobbyists and students.
=== Bootloading ===
Many of the higher end flash based PICs can also self-program (write to their own program memory), a process known as bootloading. Demo boards are available with a small factory-programmed bootloader that can be used to load user programs over an interface such as RS-232 or USB, thus obviating the need for a programmer device.
Alternatively there is bootloader firmware available that the user can load onto the PIC using ICSP. After programming the bootloader onto the PIC, the user can then reprogram the device using RS232 or USB, in conjunction with specialized computer software.
The advantages of a bootloader over ICSP is faster programming speeds, immediate program execution following programming, and the ability to both debug and program using the same cable.
=== Third party ===
There are many programmers for PIC microcontrollers, ranging from the extremely simple designs which rely on ICSP to allow direct download of code from a host computer, to intelligent programmers that can verify the device at several supply voltages. Many of these complex programmers use a pre-programmed PIC themselves to send the programming commands to the PIC that is to be programmed. The intelligent type of programmer is needed to program earlier PIC models (mostly EPROM type) which do not support in-circuit programming.
Third party programmers range from plans to build your own, to self-assembly kits and fully tested ready-to-go units. Some are simple designs which require a PC to do the low-level programming signalling (these typically connect to the serial or parallel port and consist of a few simple components), while others have the programming logic built into them (these typically use a serial or USB connection, are usually faster, and are often built using PICs themselves for control).
== Debugging ==
=== In-circuit debugging ===
All newer PIC devices feature an ICD (in-circuit debugging) interface, built into the CPU core, that allows for interactive debugging of the program in conjunction with MPLAB IDE. MPLAB ICD and MPLAB REAL ICE debuggers can communicate with this interface using the ICSP interface.
This debugging system comes at a price however, namely limited breakpoint count (1 on older devices, 3 on newer devices), loss of some I/O (with the exception of some surface mount 44-pin PICs which have dedicated lines for debugging) and loss of some on-chip features.
Some devices do not have on-chip debug support, due to cost or lack of pins. Some larger chips also have no debug module. To debug these devices, a special -ICD version of the chip mounted on a daughter board which provides dedicated ports is required. Some of these debug chips are able to operate as more than one type of chip by the use of selectable jumpers on the daughter board. This allows broadly identical architectures that do not feature all the on-chip peripheral devices to be replaced by a single -ICD chip. For example: the 16F690-ICD will function as one of six different parts, each of which features none, some or all of five on-chip peripherals.
=== In-circuit emulators ===
Microchip offers three full in-circuit emulators: the MPLAB ICE2000 (parallel interface, a USB converter is available); the newer MPLAB ICE4000 (USB 2.0 connection); and most recently, the REAL ICE (USB 2.0 connection). All such tools are typically used in conjunction with MPLAB IDE for source-level interactive debugging of code running on the target.
== Operating systems ==
PIC projects may utilize real-time operating systems such as FreeRTOS, AVIX RTOS, uRTOS, Salvo RTOS or other similar libraries for task scheduling and prioritization.
An open source project by Serge Vakulenko adapts 2.11BSD to the PIC32 architecture, under the name RetroBSD. This brings a familiar Unix-like operating system, including an onboard development environment, to the microcontroller, within the constraints of the onboard hardware.
== Clones ==
=== Parallax ===
Parallax produced a series of PICmicro-like microcontrollers known as the Parallax SX. It is currently discontinued. Designed to be architecturally similar to the PIC microcontrollers used in the original versions of the BASIC Stamp, SX microcontrollers replaced the PIC in several subsequent versions of that product.
Parallax's SX are 8-bit RISC microcontrollers, using a 12-bit instruction word, which run fast at 75 MHz (75 MIPS). They include up to 4096 12-bit words of flash memory and up to 262 bytes of random access memory, an eight bit counter and other support logic. There are software library modules to emulate I²C and SPI interfaces, UARTs, frequency generators, measurement counters and PWM and sigma-delta A/D converters. Other interfaces are relatively easy to write, and existing modules can be modified to get new features.
=== PKK Milandr ===
Russian PKK Milandr produces microcontrollers using the PIC17 architecture as the 1886 series.
Program memory consists of up to 64kB Flash memory in the 1886VE2U (Russian: 1886ВЕ2У) or 8kB EEPROM in the 1886VE5U (1886ВЕ5У). The 1886VE5U (1886ВЕ5У) through 1886VE7U (1886ВЕ7У) are specified for the military temperature range of -60 °C to +125 °C. Hardware interfaces in the various parts include USB, CAN, I2C, SPI, as well as A/D and D/A converters. The 1886VE3U (1886ВЕ3У) contains a hardware accelerator for cryptographic functions according to GOST 28147-89. There are even radiation-hardened chips with the designations 1886VE8U (1886ВЕ8У) and 1886VE10U (1886ВЕ10У).
=== ELAN Microelectronics ===
ELAN Microelectronics Corp. in Taiwan make a line of microcontrollers based on the PIC16 architecture, with 13-bit instructions and a smaller (6-bit) RAM address space.
=== Holtek Semiconductor ===
Holtek Semiconductor make a large number of very cheap microcontrollers (as low as 8.5 cents in quantity) with a 14-bit instruction set strikingly similar to the PIC16.
=== Hycon ===
Hycon Technology, a Taiwanese manufacturer of mixed-signal chips for portable electronics (multimeters, kitchen scales, etc.), has a proprietary H08 microcontroller series with a 16-bit instruction word very similar to the PIC18 family. (No relation to the Hitachi/Renesas H8 microcontrollers.) The H08A is most like the PIC18; the H08B is a subset.
Although the available instructions are almost identical, their encoding is different, as is the memory map and peripherals. For example, the PIC18 allows direct access to RAM at 0x000–0x07F or special function registers at 0xF80–0xFFF by sign-extending an 8-bit address. The H08 places special function registers at 0x000–0x07F and global RAM at 0x080–0x0FF, zero-extending the address.
=== Other manufacturers in Asia ===
Many ultra-low-cost OTP microcontrollers from Asian manufacturers, found in low-cost consumer electronics are based on the PIC architecture or modified form. Most clones only target the baseline parts (PIC16C5x/PIC12C50x). With any patents on the basic architecture long since expired, Microchip has attempted to sue some manufacturers on copyright grounds,
without success.
== See also ==
PIC16x84
Atmel AVR
Arduino
BASIC Atom
BASIC Stamp
OOPic
PICAXE
TI MSP430
Maximite
== References ==
== Further reading ==
Microcontroller Theory and Applications, with the PIC18F; 2nd Ed; M. Rafiquzzaman; Wiley; 544 pages; 2018; ISBN 978-1119448419.
Microcontroller System Design Using PIC18F Processors; Nicolas K. Haddad; IGI Global; 428 pages; 2017; ISBN 978-1683180005.
PIC Microcontroller Projects in C: Basic to Advanced (for PIC18F); 2nd Ed; Dogan Ibrahim; Newnes; 660 pages; 2014; ISBN 978-0080999241. (1st Ed)
Microcontroller Programming: Microchip PIC; Sanchez and Canton; CRC Press; 824 pages; 2006; ISBN 978-0849371899. (1st Ed)
PIC Microcontroller Project Book; John Iovine; TAB; 272 pages; 2000; ISBN 978-0071354790. (1st Ed)
== External links ==
.
Official Microchip website
PIC wifi projects website | Wikipedia/PIC_microcontrollers |
A single-board microcontroller is a microcontroller built onto a single printed circuit board. This board provides all of the circuitry necessary for a useful control task: a microprocessor, I/O circuits, a clock generator, RAM, stored program memory and any necessary support ICs. The intention is that the board is immediately useful to an application developer, without requiring them to spend time and effort to develop controller hardware.
As they are usually low-cost, and have an especially low capital cost for development, single-board microcontrollers have long been popular in education. They are also a popular means for developers to gain hands-on experience with a new processor family.
== Origins ==
Single-board microcontrollers appeared in the late 1970s, when the appearance of early microprocessors, such as the 6502 and the Z80, made it practical to build an entire controller on a single board, as well as affordable to dedicate a computer to a relatively minor task.
In March 1976, Intel announced a single-board computer product that integrated all of the support components required for their 8080 microprocessor, along with 1 kilobyte of RAM, 4 kilobytes of user-programmable ROM, and 48 lines of parallel digital I/O with line drivers. The board also offered expansion through a bus connector, but could be used without an expansion card cage when applications did not require additional hardware. Software development for this system was hosted on Intel's Intellec MDS microcomputer development system; this provided assembler and PL/M support, and permitted in-circuit emulation for debugging.
Processors of this era required a number of support chips to be included outside of the processor. RAM and EPROM were separate, often requiring memory management or refresh circuitry for dynamic memory. I/O processing might have been carried out by a single chip such as the 8255, but frequently required several more chips.
A single-board microcontroller differs from a single-board computer in that it lacks the general-purpose user interface and mass storage interfaces that a more general-purpose computer would have. Compared to a microprocessor development board, a microcontroller board would emphasize digital and analog control interconnections to some controlled system, whereas a development board might by have only a few or no discrete or analog input/output devices. The development board exists to showcase or train on some particular processor family and, therefore, internal implementation is more important than external function.
== Internal bus ==
The bus of the early single-board devices, such as the Z80 and 6502, was universally a Von Neumann architecture. Program and data memory were accessed via the same shared bus, even though they were stored in fundamentally different types of memory: ROM for programs and RAM for data. This bus architecture was needed to economise the number of pins needed from the limited 40 available for the processor's ubiquitous dual-in-line IC package.
It was common to offer access to the internal bus through an expansion connector, or at least provide space for a connector to be soldered on. This was a low-cost option and offered the potential for expansion, even if it was rarely used. Typical expansions would be I/O devices or additional memory. It was unusual to add peripheral devices such as tape or disk storage, or a CRT display
Later, when single-chip microcontrollers, such as the 8048, became available, the bus no longer needed to be exposed outside the package, as all necessary memory could be provided within the chip package. This generation of processors used a Harvard architecture with separate program and data buses, both internal to the chip. Many of these processors used a modified Harvard architecture, where some write access was possible to the program data space, thus permitting in-circuit programming. None of these processors required, or supported, a Harvard bus across a single-board microcontroller. When they supported a bus for expansion of peripherals, a dedicated I/O bus, such as I²C, 1-Wire or various serial buses, was used.
== External bus expansion ==
Some microcontroller boards using a general-purpose microprocessor can bring the address and data bus of the processor to an expansion connector, allowing additional memory or peripherals to be added. This provides resources not already present on the single board system. Since not every system will require expansion, the connector may be optional, with a mounting position provided for installation by the user if desired.
== Input and output ==
Microcontroller systems provide multiple forms of input and output signals to allow application software to control an external "real-world" system. Discrete digital I/O provides a single bit of data (on or off). Analog signals, representing a continuous variable range, such as temperature or pressure, can also be inputs and outputs for microcontrollers.
Discrete digital inputs and outputs might be buffered from the microprocessor data bus only by an addressable latch, or might be operated by a specialized input/output IC, such as an Intel 8255 or Motorola 6821 parallel input/output adapter. Later single-chip microcontrollers have input and output pins available. These input/output circuits usually do not provide enough current to directly operate devices like lamps or motors, so solid-state relays are operated by the microcontroller digital outputs, and inputs are isolated by signal conditioning level-shifting and protection circuits.
One or more analog inputs, with an analog multiplexer and common analog-to-digital converter, are found on some microcontroller boards. Analog outputs may use a digital-to-analog converter or, on some microcontrollers, may be controlled by pulse-width modulation. For discrete inputs, external circuits may be required to scale inputs, or to provide functions like bridge excitation or cold junction compensation.
To control component costs, many boards were designed with extra hardware interface circuits but without the components for these circuits installed, leaving the board bare. The circuit was added as an option on delivery, or could be populated later.
It is common practice for boards to include "prototyping areas", areas of the board laid out as a solderable breadboard area with the bus and power rails available, but without a defined circuit. Several controllers, particularly those intended for training, also include a pluggable, re-usable breadboard for easy prototyping of extra I/O circuits that could be changed or removed for later projects.
== Communications and user interfaces ==
Communications interfaces vary depending on the age of the microcontroller system. Early systems might implement a serial port to provide RS-232 or current loop. The serial port could be used by the application program or could be used, in conjunction with a monitor ROM, to transfer programs into the microcontroller memory. Current microcontrollers may support USB, wireless networks (Wi-Fi, Zigbee, or others), or provide an Ethernet connection. In addition, they may support a TCP/IP protocol stack. Some devices have firmware available to implement a Web server, allowing an application developer to rapidly build a Web-enabled instrument or system.
== Programming ==
Many early systems had no internal facilities for programming, and relied on a separate "host" system for this task. This programming was typically done in assembly language, or sometimes in C or PL/M, and then cross-assembled or cross-compiled on the host. Some single-board microcontrollers support a BASIC language system, allowing programs to be developed on the target hardware. Hosted development allows all the storage and peripherals of a desktop computer to be used, providing a more powerful development environment.
=== EPROM burning ===
Early microcontrollers relied on erasable programmable read-only memory (EPROM) devices to hold the application program. The object code from a host system would be "burned" onto an EPROM with an EPROM programmer. This EPROM was then physically plugged into the board. As the EPROM would be removed and replaced many times during program development, it was common to provide a ZIF socket to avoid wear or damage. Erasing an EPROM with a UV eraser takes a considerable time, and so it was also common for a developer to have several EPROMs in circulation at any one time.
Some microcontroller devices were available with on-board EPROM. These would also be programmed in a separate burner, then put into a socket on the target system.
The use of EPROM sockets allowed field updates to the application program, either to fix errors or to provide updated features.
=== Keypad monitors ===
When the single-board controller formed the entire development environment (typically in education), the board might also have included a simple hexadecimal keypad, calculator-style LED display, and a "monitor" program set permanently in ROM. This monitor allowed machine code programs to be entered directly through the keyboard and held in RAM. These programs were in machine code, not even in assembly language, and were often assembled by hand on paper before being inputted. It is arguable as to which process was more time-consuming and error prone: assembling by hand, or keying byte-by-byte.
Single-board "keypad and calculator display" microcontrollers of this type were very similar to some low-end microcomputers of the time, such as the KIM-1 or the Microprofessor I. Some of these microprocessor "trainer" systems are still in production today, used as very low-cost introductions to microprocessors at the hardware programming level.
=== Hosted development ===
When desktop personal computers appeared, initially CP/M or Apple II, then later the IBM PC and compatibles, there was a shift to hosted development. Hardware was now cheaper and RAM capacity had expanded such that it was possible to download the program through the serial port and hold it in RAM. This massive reduction in the cycle time to test a new version of a program gave an equally large boost in development speed.
This program memory was still volatile and would be lost if power was lost. Flash memory was not yet available at a viable price. As a completed controller project was usually required to be non-volatile, the final step in a project was often to burn it to an EPROM.
== Single-chip microcontrollers ==
Single-chip microcontrollers, such as the Intel 8748, combined many of the features of previous boards into a single IC package. Single-chip microcontrollers integrate memory (both RAM and ROM) on-package and, therefore, do not need to expose the data and address bus through the pins of the IC package. These pins are then available for I/O lines. These changes also reduce the area required on the printed circuit board and simplify the design of the single-board microcontroller. Examples of single-chip microcontrollers include:
Intel 8748
PIC
Atmel AVR
=== Program memory ===
For production use as embedded systems, the on-board ROM was either mask programmed at the chip factory or one-time programmed (OTP) by the developer as a PROM. PROMs often used the same UV EPROM technology for the chip, but in a cheaper package without the transparent erasure window. During program development, it was still necessary to burn EPROMs. In this case, the entire controller IC, and therefore the ZIF sockets, would be provided.
With the development of affordable EEPROM and flash memory, it became practical to attach the controller permanently to the board and to download program code from a host computer through a serial connection. This was termed "in-circuit programming". Erasure of old programs was carried out by either over-writing them with a new download, or bulk erasing them electrically (for EEPROM). The latter method was slower, but could be carried out in-situ.
The main function of the controller board was then to carry the support circuits for this serial or, on later boards, USB interface. As a further convenience during development, many boards also had low-cost features like LED monitors of the I/O lines or reset switches mounted on board.
== Single-board microcontrollers today ==
It is now cheap and simple to design circuit boards for microcontrollers. Development host systems are also cheap, especially when using open source software. Higher level programming languages abstract details of the hardware, making differences between specific processors less obvious to the application programmer. Rewritable flash memory has replaced slow programming cycles, at least during program development. Accordingly, almost all development now is based on cross-compilation from personal computers and programs are downloaded to the controller board through a serial-like interface, usually appearing to the host as a USB device.
The original market demand for a simplified board implementation is no longer as relevant for microcontrollers. Single-board microcontrollers are still important, but have shifted their focus to:
Easily accessible platforms aimed at traditionally "non-programmer" groups, such as artists, designers, hobbyists, and others interested in creating interactive objects or environments. Some typical projects in 2011 included: the backup control of DMX stage lights and special effects, multi-camera control, autonomous fighting robots, controlling bluetooth projects from a computer or smart phone, LEDs and multiplexing, displays, audio, motors, mechanics, and power control. These controllers may be embedded to form part of a physical computing project. Popular choices for this work are the Arduino, Dwengo or Wiring.
Technology demonstration boards for innovative processors or peripheral features:
AVR Butterfly
Parallax Propeller
== See also ==
Comparison of single-board microcontrollers
Microprocessor development board
Embedded system
Programmable logic controller
Arduino
Make Controller Kit
PICAXE
BASIC Stamp
Raspberry Pi
Asus Tinker Board
Tinkerforge
== References == | Wikipedia/Single-board_microcontroller |
An industrial PC is a computer intended for industrial purposes (production of goods and services), with a form factor between a nettop and a server rack. Industrial PCs have higher dependability and precision standards, and are generally more expensive than consumer electronics. They often use complex instruction sets, such as x86, where reduced instruction sets such as ARM would otherwise be used.
== History ==
IBM released the 5531 Industrial Computer in 1984, arguably the first "industrial PC". The IBM 7531, an industrial version of the IBM AT PC was released May 21, 1985. Industrial Computer Source first offered the 6531 Industrial Computer in 1985. This was a proprietary 4U rackmount industrial computer based on a clone IBM PC motherboard.
== Applications ==
Industrial PCs are primarily used for process control and/or data acquisition. In some cases, an industrial PC is simply used as a front-end to another control computer in a distributed processing environment. Software can be custom written for a particular application or an off-the-shelf package such as TwinCAT, Wonder Ware, Labtech Notebook or LabView can be used to provide a base level of programming.
Analog Devices got exclusive sales for OEM European industrial market and provided MACSYM 120 combined IBM 5531 and MACBASIC a multitasking basic running on C/CPM from Digital Research. Analog and digital I/O cards plugged inside PC and/or extension rack made MAC120 as one of the most powerful and easy to use controller for plant applications at this date.
An application may simply require the I/O such as the serial port offered by the motherboard. In other cases, expansion cards are installed to provide analog and digital I/O, specific machine interface, expanded communications ports, and so forth, as required by the application.
Industrial PCs offer different features than consumer PCs in terms of reliability, compatibility, expansion options and long-term supply.
Industrial PCs are typically characterized by being manufactured in lower volumes than home or office PCs. A common category of industrial PC is the 19-inch rackmount form factor. Industrial PCs typically cost considerably more than comparable office style computers with similar performance. Single-board computers and back planes are used primarily in industrial PC systems. However, the majority of industrial PCs are manufactured with COTS motherboards.
A subset of industrial PCs is the Panel PC where a display, typically an LCD, is incorporated into the same enclosure as the motherboard and other electronics. These are typically panel mounted and often incorporate touch screens for user interaction. They are offered in low cost versions with no environmental sealing, heavier duty models sealed to IP67 standards to be waterproof at the front panel and including models which are explosion proof for installation into hazardous environments.
== Construction and features ==
Virtually all industrial PCs share an underlying design philosophy of providing a controlled environment for the installed electronics to survive the rigors of the plant floor. The electronic components themselves may be selected for their ability to withstand higher and lower operating temperatures than typical commercial components.
Heavier metal construction as compared to the typical office non-rugged computer
Enclosure form factor that includes provision for mounting into the surrounding environment (19" rack, wall mount, panel mount, etc.)
Additional cooling with air filtering
Wider operating temperature range than normal PCs, with the widest temperature ranges being -40 to 75°C
Alternative cooling methods such as forced air, liquid, and conduction
Expansion card retention and support
Enhanced EMI filtering and gasket
Enhanced environmental protection such as dust proof, water spray or immersion proof, etc.
Sealed MIL-SPEC or Circular-MIL connectors
More robust controls and features
Higher grade power supply
Controlled access to the controls through the use of locking doors
Controlled access to the I/O through the use of access covers
Inclusion of a watchdog timer to reset the system automatically in case of software lock-up
== See also ==
Embedded system
Rugged computer
== References == | Wikipedia/Industrial_PC |
Science fiction prototyping (SFP) refers to the idea of using science fiction to describe and explore the implications of futuristic technologies and the social structures enabled by them. Similar terms are design fiction, speculative design, and critical design.
== History and progress ==
The idea was introduced by Brian David Johnson in 2010 who, at the time, was a futurist at Intel working on the challenge his company faced anticipating the market needs for integrated circuits at the end of their 7–10 years design and production cycle. The roots for Science Fiction Prototyping can be traced back to two papers, the first by Callaghan et-al “Pervasive Computing and Urban Development: Issues for the individual and Society”, presented at the 2004 United Nations World Urban Forum which used short stories as a means to convey potential future threats of technology to society and the second, by Egerton et-al "Using Multiple Personas In Service Robots To Improve Exploration Strategies When Mapping New Environments" describing multiple personas and irrational thinking for humanoid robots which inspired Brian David Johnson to write the first Science Fiction Prototype, Nebulous Mechanisms, which went on to become a series of stories that eventually morphed into Intel's 21st Century Robot project. Together Johnson, Callaghan and Egerton formed the Creative Science Foundation as a vehicle to promote and support the use of Science Fiction Prototyping and its derivatives. The first public Science Fiction Prototyping event was Creative Science 2010 (not to be confused with Creation Science), held in Kuala Lumpur, Malaysia on 19 July 2010. This event was also significant as it included the Science Fiction Prototype Tales From a Pod which became the first Science Fiction Prototype to be commercialised (by Immersive Displays Ltd, ImmersaVU). In 2011, a second Science Fiction Prototyping workshop was held in Nottingham (UK), Creative Science 2011, in which Intel made the first documentary about this methodology. Shortly afterwards the Creative Science Foundation was formed as an umbrella organisation to manage Science Fiction Prototyping activity, leading to a proliferation of events and publications; a more detailed account is provided on the Science Fiction Prototyping History web pages.
== Methodology ==
The core methodology is the use of creative arts as a means to introduce innovations into science, engineering, business and socio-political systems. It doesn't aim to forecast the future, rather it focuses on inventing or innovating the future by extrapolating forward trends from research or foresight activities (creating new concepts, schemes, services and products). The main (but not exclusive) methodology is the use of science-fiction stories, grounded in existing practice which are written for the explicit purpose of acting as prototypes for people to explore a wide variety of futures. These 'science fiction prototypes' (SFPs) can be created by scientists, engineers, business or socio-political professionals to stretch their work or, for example, by writers, film/stage directors, school children and members of the public to influence the work of professionals. In this way these stories act as a way of involving the widest section of the population to help set the research agenda. Johnson advocates the following five step process for writing Science Fiction Prototypes:
Pick Your Science and Build Your World
Identify the Scientific Inflection Point
Consider ramifications of the Science on People
Identify the Human Inflection Point
Reflect on what Did We Learn?
Full Science Fiction Prototypes are about 6–12 pages long, with a popular structure being: an introduction, background work, the fictional story (the bulk of the SFP), a short summary and a summary (reflection). Most often science fiction prototypes extrapolate current science forward and, therefore, include a set of references at the end. Such prototypes can take several days to write and for situations where ideas need to be generated faster (e.g. meetings), the concept of micro science fiction prototypes (μSFP) is used. Generally, μSFP are the size of a Twitter or Text message, being around 25–30 words (140–160 characters in standard English).
== Applications ==
Science fiction prototyping has a number of applications. The most obvious is for product innovation, in which the two earliest examples are Intel's 21st Century Robot (an open innovation project to develop a domestic robot) and Essex University's eDesk (a mixed-reality immersive education desk) both of which were introduced in the previous section. Beyond product innovation, science fiction prototyping finds itself being applied to many diverse areas. For example, at the University of Washington (USA) they have used it to facilitate broader contextual and societal thinking about computers, computer security risks, and security defense as part of an optional senior-level course in computer security. In 2014, these ideas were refined into a SFP methodology called Threatcasting with early adopters including the United States Air Force Academy, the Government of California, and the Army Cyber Institute at West Point Military Academy. An earlier variation called Futurcasting was used by government to provide a tool to influence the direction of society and politics. It did this by using stories about possible futures as a medium to engage the population in conversations about futures they would like to encourage or avoid. Science Fiction Prototyping is also being used in business environments. For example, in Canterbury Christ Church University (UK) Business School it is being used as a vehicle to introduce creative thinking in support of entrepreneurship courses. In the National Taiwan University (Taiwan), it is used to increase business school students' interests in science and technology for business innovation. Elsewhere the Business Schools of the universities of Leeds and Manchester (UK) are exploring its use in community development projects. Finally, it is being applied to Education. For example, in San-Diego State University (USA) Department of Learning Design and Technology they have explored it as a means for motivating pre-university students to take up STEM studies and careers. Further afield, in China, they have identified a novel use for the methodology to address the mandatory requirement for all science and engineering students to take a course in English language. In particular Shijiazhuang University (China) are exploring the potential for Science Fiction Prototyping to overcome the dullness that some science students experience in language learning by using it as an integrated platform for teaching Computer English, combining language and science learning. China is also concerned to improve the creative and innovation capabilities of their graduate which this approach supports.
== See also ==
Creative problem-solving
Creative writing
Creativity
Critical design
Design fiction
Divergent thinking
Futures studies
Category:Futures studies
Futures techniques
Lateral thinking
Threatcasting
Torrance Tests of Creative Thinking
== References ==
== Further reading ==
"Learn to tell science stories". Editorial. Nature. 555 (7695): 141–2. 7 March 2018. Bibcode:2018Natur.555Q.141.. doi:10.1038/d41586-018-02740-5. PMID 29517034. | Wikipedia/Science_fiction_prototyping |
Logico-linguistic modeling is a method for building knowledge-based systems with a learning capability using conceptual models from soft systems methodology, modal predicate logic, and logic programming languages such as Prolog.
== Overview ==
Logico-linguistic modeling is a six-stage method developed primarily for building knowledge-based systems (KBS), but it also has application in manual decision support systems and information source analysis. Logico-linguistic models have a superficial similarity to John F. Sowa's conceptual graphs; both use bubble style diagrams, both are concerned with concepts, both can be expressed in logic and both can be used in artificial intelligence. However, logico-linguistic models are very different in both logical form and in their method of construction.
Logico-linguistic modeling was developed in order to solve theoretical problems found in the soft systems method for information system design. The main thrust of the research into has been to show how soft systems methodology (SSM), a method of systems analysis, can be extended into artificial intelligence.
== Background ==
SSM employs three modeling devices i.e. rich pictures, root definitions, and conceptual models of human activity systems. The root definitions and conceptual models are built by stakeholders themselves in an iterative debate organized by a facilitator. The strengths of this method lie, firstly, in its flexibility, the fact that it can address any problem situation, and, secondly, in the fact that the solution belongs to the people in the organization and is not imposed by an outside analyst.
Information requirements analysis (IRA) took the basic SSM method a stage further and showed how the conceptual models could be developed into a detailed information system design. IRA calls for the addition of two modeling devices: "Information Categories", which show the required information inputs and outputs from the activities identified in an expanded conceptual model; and the "Maltese Cross", a matrix which shows the inputs and outputs from the information categories and shows where new information processing procedures are required. A completed Maltese Cross is sufficient for the detailed design of a transaction processing system.
The initial impetus to the development of logico-linguistic modeling was a concern with the theoretical problem of how an information system can have a connection to the physical world. This is a problem in both IRA and more established methods (such as SSADM) because none base their information system design on models of the physical world. IRA designs are based on a notional conceptual model and SSADM is based on models of the movement of documents.
The solution to these problems provided a formula that was not limited to the design of transaction processing systems but could be used for the design of KBS with learning capability.
== The six stages of logico-linguistic modeling ==
The logico-linguistic modeling method comprises six stages.
=== 1. Systems analysis ===
In the first stage logico-linguistic modeling uses SSM for systems analysis. This stage seeks to structure the problem in the client organization by identifying stakeholders, modelling organizational objectives and discussing possible solutions. At this stage it not assumed that a KBS will be a solution and logico-linguistic modeling often produces solutions that do not require a computerized KBS.
Expert systems tend to capture the expertise, of individuals in different organizations, on the same topic. By contrast a KBS, produced by logico-linguistic modeling, seeks to capture the expertise of individuals in the same organization on different topics. The emphasis is on the elicitation of organizational or group knowledge rather than individual experts. In logico-linguistic modeling the stakeholders become the experts.
The end point of this stage is an SSM style conceptual models such as figure 1.
=== 2. Language creation ===
According to the theory behind logico-linguistic modeling the SSM conceptual model building process is a Wittgensteinian language-game in which the stakeholders build a language to describe the problem situation. The logico-linguistic model expresses this language as a set of definitions, see figure 2.
=== 3. Knowledge elicitation ===
After the model of the language has been built putative knowledge about the real world can be added by the stakeholders. Traditional SSM conceptual models contain only one logical connective (a necessary condition). In order to represent causal sequences, "sufficient conditions" and "necessary and sufficient conditions" are also required. In logico-linguistic modeling this deficiency is remedied by two addition types of connective. The outcome of stage three is an empirical model, see figure 3.
=== 4. Knowledge representation ===
Modal predicate logic (a combination of modal logic and predicate logic) is used as the formal method of knowledge representation. The connectives from the language model are logically true (indicated by the "L" modal operator) and connective added at the knowledge elicitation stage are possibility true (indicated by the "M" modal operator). Before proceeding to stage 5, the models are expressed in logical formulae.
=== 5. Computer code ===
Formulae in predicate logic translate easily into the Prolog artificial intelligence language. The modality is expressed by two different types of Prolog rules. Rules taken from the language creation stage of model building process are treated as incorrigible. While rules from the knowledge elicitation stage are marked as hypothetical rules. The system is not confined to decision support but has a built in learning capability.
=== 6. Verification ===
A knowledge based system built using this method verifies itself. Verification takes place when the KBS is used by the clients. It is an ongoing process that continues throughout the life of the system. If the stakeholder beliefs about the real world are mistaken this will be brought out by the addition of Prolog facts that conflict with the hypothetical rules. It operates in accordance to the classic principle of falsifiability found in the philosophy of science
== Applications ==
=== Knowledge-based computer systems ===
Logico-linguistic modeling has been used to produce fully operational computerized knowledge based systems, such as one for the management of diabetes patients in a hospital out-patients department.
=== Manual decision support ===
In other projects the need to move into Prolog was considered unnecessary because the printed logico-linguistic models provided an easy to use guide to decision making. For example, a system for mortgage loan approval
=== Information source analysis ===
In some cases a KBS could not be built because the organization did not have all the knowledge needed to support all their activities. In these cases logico-linguistic modeling showed shortcomings in the supply of information and where more was needed. For example, a planning department in a telecoms company
== Criticism ==
While logico-linguistic modeling overcomes the problems found in SSM's transition from conceptual model to computer code, it does so at the expense of increased stakeholder constructed model complexity. The benefits of this complexity are questionable
and this modeling method may be much harder to use than other methods.
This contention has been exemplified by subsequent research. An attempt by researchers to model buying decisions across twelve companies using logico-linguistic modeling required simplification of the models and removal of the modal elements.
== See also ==
Argument map
Cognitive map
Concept map
Fuzzy cognitive map
Knowledge representation and reasoning
Rhetorical structure theory
Semantic network
== References ==
== Further reading ==
Gregory, Frank Hutson (1993) A logical analysis of soft systems modelling: implications for information system design and knowledge based system design. PhD thesis, University of Warwick. | Wikipedia/Logico-linguistic_modeling |
A systems analyst, also known as business technology analyst, is an information technology (IT) professional who specializes in analyzing, designing and implementing information systems. Systems analysts assess the suitability of information systems in terms of their intended outcomes and liaise with end users, software vendors and programmers in order to achieve these outcomes. A systems analyst is a person who uses analysis and design techniques to solve business problems using information technology. Systems analysts may serve as change agents who identify the organizational improvements needed, design systems to implement those changes, and train and motivate others to use the systems.
== Industry ==
As of 2015, the sectors employing the greatest numbers of computer systems analysts were state government, insurance, computer system design, professional and commercial equipment, and company and enterprise management. The number of jobs in this field is projected to grow from 487,000 as of 2009 to 650,000 by 2016. According to the U.S. Bureau of Labor Statistics (BLS), Occupational Outlook predicts the need for Computer Systems Analysts as growing 25% in 2012 to 2022 and gradually decreasing their estimates and now predict the years 2022 to 2032 as only a growth of 10% Saying "Many of those openings are expected to result from the need to replace workers who transfer to different occupations or exit the labor force, such as to retire."
This job ranked third best in a 2010 survey, fifth best in the 2011 survey, 9th best in the 2012 survey and the 10th best in the 2013 survey.
== See also ==
Business analyst
Change management analyst
Data analyst
Software analyst
== References ==
== External links ==
Computer Systems Analysts in the Occupational Outlook Handbook from the Bureau of Labor Statistics, a unit of the United States Department of Labor | Wikipedia/Systems_analyst |
The chain-linked model or Kline model of innovation was introduced by mechanical engineer Stephen J. Kline in 1985, and further described by Kline and economist Nathan Rosenberg in 1986. The chain-linked model is an attempt to describe complexities in the innovation process. The model is regarded as Kline's most significant contribution.
== Description ==
In the chain-linked model, new knowledge is not necessarily the driver for innovation. Instead, the process begins with the identification of an unfilled market need. This drives research and design, then redesign and production, and finally marketing, with complex feedback loops between all the stages. There are also important feedback loops with the organization's and the world's stored base of knowledge, with new basic research conducted or commissioned as necessary, to fill in gaps.
It is often contrasted with the so-called linear model of innovation, in which basic research leads to applied development, then engineering, then manufacturing, and finally marketing and distribution.
== Applications ==
The Kline model was conceived primarily with commercial industrial settings in mind, but has found broad applicability in other settings, for example in military technology development. Variations and extensions of the model have been described by a number of investigators.
== See also ==
Actor-network theory
Cybernetics
Creativity techniques
Crowdsourcing
Diffusion of innovations
Innovation
List of emerging technologies
New product development
Open innovation
Participatory design
Phase–gate model
Pro-innovation bias
Product lifecycle
Social shaping of technology
Strategic foresight
Technological change
User-centered design
User innovation
== References == | Wikipedia/Chain-linked_model |
In library and information science, cataloging (US) or cataloguing (UK) is the process of creating metadata representing information resources, such as books, sound recordings, moving images, etc. Cataloging provides information such as author's names, titles, and subject terms that describe resources, typically through the creation of bibliographic records. The records serve as surrogates for the stored information resources. Since the 1970s these metadata are in machine-readable form and are indexed by information retrieval tools, such as bibliographic databases or search engines. While typically the cataloging process results in the production of library catalogs, it also produces other types of discovery tools for documents and collections.
Bibliographic control provides the philosophical basis of cataloging, defining the rules that sufficiently describe information resources, and enable users to find and select the most appropriate resource. A cataloger is an individual responsible for the processes of description, subject analysis, classification, and authority control of library materials. Catalogers serve as the "foundation of all library service, as they are the ones who organize information in such a way as to make it easily accessible".
== Cataloging different kinds of materials ==
Cataloging is a process made in different kinds of institutions (e.g. libraries, archives and museums) and about different kinds of materials, such as books, pictures, museum objects etc. The literature of library and information science is dominated by library cataloging, but it is important to consider other forms of cataloging. For example, there are special systems for cataloging museum objects that have been developed, e.g., Nomenclature for Museum Cataloging. Also, some formats have been developed in some opposition to library cataloging formats, for example, the common communication format for bibliographical databases. About cataloging different kinds of cultural objects, see O'Keefe and Oldal (2017).
== Six functions of bibliographic control ==
Ronald Hagler identified six functions of bibliographic control.
"Identifying the existence of all types of information resources as they are made available." The existence and identity of an information resource must be known before it can be found.
"Identifying the works contained within those information resources or as parts of them." Depending on the level of granularity required, multiple works may be contained in a single package, or one work may span multiple packages. For example, is a single photo considered an information resource? Or can a collection of photos be considered an information resource?
"Systematically pulling together these information resources into collections in libraries, archives, museums, and Internet communication files, and other such depositories." Essentially, acquiring these items into collections so that they can be of use to the user.
"Producing lists of these information resources prepared according to standard rules for citation." Examples of such retrieval aids include library catalogs, indexes, archival finding aids, etc.
"Providing name, title, subject, and other useful access to these information resources." Ideally, there should be many ways to find an item so there should be multiple access points. There must be enough metadata in the surrogate record so users can successfully find the information resource they are looking for. These access points should be consistent, which can be achieved through authority control.
"Providing the means of locating each information resource or a copy of it." In libraries, the online public access catalog (OPAC) can give the user location information (a call number for example) and indicate whether the item is available.
== History of bibliographic control ==
While the organization of information has been going on since antiquity, bibliographic control as we know it today is a more recent invention. Ancient civilizations recorded lists of books onto tablets and libraries in the Middle Ages kept records of their holdings. With the invention of the printing press in the 15th century, multiple copies of a single book could be produced quickly. Johann Tritheim, a German librarian, was the first to create a bibliography in chronological order with an alphabetical author index. Conrad Gessner followed in his footsteps in the next century as he published an author bibliography and subject index. He added to his bibliography an alphabetical list of authors with inverted names, which was a new practice. He also included references to variant spellings of author's names, a precursor to authority control. Andrew Maunsell further revolutionized bibliographic control by suggesting that a book should be findable based on the author's last name, the subject of the book, and the translator. In the 17th century Sir Thomas Bodley was interested in a catalog arranged alphabetically by author's last name as well as subject entries. Sir Robert Cotton's library catalogued books with busts of famous Romans. The busts were organized by their name, i.e. N for Nero, and then came the shelf with its assigned letter, and then the roman numeral of the title's number. For example, the cataloging for The Lindisfarne Gospels reads Nero D IV. Cotton's cataloging method is still in use for his collection in the British Library. In 1697, Frederic Rostgaard called for subject arrangement that was subdivided by both chronology and by size (whereas in the past titles were arranged by their size only), as well as an index of subjects and authors by last name and for word order in titles to be preserved based on the title page.
After the French Revolution, France's government was the first to put out a national code containing instructions for cataloging library collections. At the British Museum Library Anthony Panizzi created his "Ninety-One Cataloging Rules" (1841), which essentially served as the basis for cataloging rules of the 19th and 20th centuries. Charles C. Jewett applied Panizzi's "91 Rules" at the Smithsonian Institution.
== Types of cataloging ==
=== Descriptive cataloging ===
"Descriptive cataloging" is a well-established concept in the tradition of library cataloging in which a distinction is made between descriptive cataloging and subject cataloging, each applying a set of standards, different qualifications and often also different kinds of professionals. In the tradition of documentation and information science (e.g., by commercial bibliographical databases) the concept document representation (also as verb: document representing) have mostly been used to cover both "descriptive" and "subject" representation. Descriptive cataloging has been defined as "the part of cataloging concerned with describing the physical details of a book, such as the form and choice of entries and the title page transcription."
=== Subject cataloging ===
Subject cataloging may take the form of classification or (subject) Indexing. subject cataloguing is the process of assigning terms that describe what a bibliographic item is about whereby Cataloguers perform subject analysis for items in their library, most commonly selecting terms from an authorized list of subject headings, otherwise known as a 'controlled vocabulary. Classification involves the assignment of a given document to a class in a classification system (such as Dewey Decimal Classification or the Library of Congress Subject Headings). Indexing is the assignment of characterizing labels to the documents represented in a record.
Classification typically uses a controlled vocabulary, while indexing may use a controlled vocabulary, free terms, or both.
== History ==
Libraries have made use of catalogs in some form since ancient times. The very earliest evidence of categorization is from a c. 2500 BCE collection of clay tablets marked in cuneiform script from Nippur, an ancient Sumerian city in present-day Iraq, wherein two lists of works of Sumerian literature of various myths, hymns, and laments are listed. As one tablet had 62 titles, and the other 68, with 43 titles common between them, and 25 new titles in the latter, they are thought to comprise a catalog of the same collection at different periods of time.: 3–4
The library of Ashurbanipal in ancient Nineveh is the first library known to have a classification system on clay tablets. They had cuneiform marks on each side of the tablet. The Library of Alexandria is reported to have had at least a partial catalog consisting of a listing by Callimachus of the Greek literature called "Pinakes". There were originally 825 fragments of Callimachus' "Pinakes", but only 25 of them have survived. The Chinese Imperial Library of the Han dynasty of the 3rd century A.D. had a catalog listing nearly 30,000 items, each item similar in extent of its content to a Western scroll. The first catalogs in the Islamic world, around the 11th century, were lists of books donated to libraries by persons in the community. These lists were ordered by donor, not by bibliographic information, but they provided a record of the library's inventory.
Many early and medieval libraries in Europe were associated with religious institutions and orders, including the Papal library in Rome. The first Vatican Library catalog is from the late 14th century. These catalogs generally used a topical arrangement that reflected the topical arrangement of the books themselves. The Vatican Library published 'rules for the catalog of printed books' in 1939. These rules were then translated to English and published in the United States in 1949. Back in medieval times, the library of the Sorbonne in Paris had accumulated more than one thousand books, and in 1290 their catalog pioneered the use of the alphabet as an organizing tool.
It was the growth in libraries after the invention of moveable-type printing and the widespread availability of paper that created the necessity for a catalog that organized the library's materials so that they could be found through the catalog rather than "by walking around." By the 17th century libraries became seen as collections of universal knowledge. Two 17th-century authors, Gabriel Naudé, in France, and John Dury, in Scotland, both developed theories of systematic organization of libraries. The development of principles and rules that would guide the librarian in the creation of catalogs followed. The history of cataloging begins at this point.
In ancient times in the orient the title was used to identify the work. Since the renaissance the author has been the main source of identification.
== Cataloging standards ==
Cataloging rules have been defined to allow for consistent cataloging of various library materials across several persons of a cataloging team and across time.
=== Anglo-American cataloging standards ===
The English-speaking libraries have shared cataloging standards since the early 1800s. The first such standard is attributed to Anthony Panizzi, the Keeper of the Printed Books of the British Museum Library. His 91 rules, published in 1841, formed the basis for cataloging standards for over 150 years.
Subsequent work in the 19th century was done by Charles Coffin Jewett, head of the Smithsonian library, which at the time was positioned to become the national library of the United States. Jewett used stereotype plates to produce the library's catalog in book form, and proposed the sharing of cataloging among libraries. His rules were published in 1853. A disagreement with the head Smithsonian secretary caused Jewett to be dismissed from his position but soon after he accepted a position with the Boston Public Library. He was tasked with purchasing books as well as arranging them. Jewett earned the role of director of the Boston Public Library in 1858; during this time the Index to the Catalogue of a Portion of the Public Library of the City of Boston Arranged in its Lower Hall was published. The article included new cataloging information alongside many of the Smithsonian cataloging rules that Jewett created. His systems became a model for other libraries as he pushed for alphabetical card catalogs.
Jewett was followed by Charles Ammi Cutter, an American librarian whose Rules for a Dictionary Catalog were published in 1876. Cutter championed the concept of "ease of use" for library patrons.
In the 20th century, library cataloging was forced to address new formats for materials, including sound recordings, movies, and photographs. Seymour Lubetzky, once an employee of the Library of Congress and later a professor at UCLA, wrote a critique of the 1949 ALA rules for entry, Cataloging Rules and Principles: A Critique of the ALA Rules for Entry and a Proposed Design for the Revision. Lubetzky's writings revealed the weaknesses in the existing rules, and spoke to the need for preparing a set of standards for a more complete and succinct code. As changes in culture over time would necessitate an ever-increasing/changing list of rules, Lubetzky "helped remedy the situation by advocating the concept of cataloging according to 'basic principles,' in place of a rule for each case that might arise." He was tasked to do extensive studies of the current cataloging rules over the time period from 1946 to 1969. His analyses shaped the subsequent cataloging rules.
The published American and Anglo-American cataloging rules in the 20th century were:
Anglo-American rules: Catalog Rules: Author and Title Entries. 1908.
American Library Association rules: A.L.A. Cataloging Rules for Author and Title Entries. 1949.
Library of Congress rules: Rules for Descriptive Cataloging in the Library of Congress. 1949.
AACR: Anglo-American Cataloguing Rules. 1967.
AACR2: Gorman, Michaël; Winkler, Paul Walter; Association, American Library (1978). Anglo-American Cataloguing Rules (2nd ed.). ISBN 978-0-8389-3210-0.
AACR2-R: Gorman, Michael; Winkler, Paul Walter; Aacr, Joint Steering Committee for Revision of; Association, American Library (1988). Anglo-American Cataloguing Rules (2nd revised ed.). ISBN 978-0-8389-3346-6.
The 21st century brought renewed thinking about library cataloging, in great part based on the increase in the number of digital formats, but also because of a new consciousness of the nature of the "Work" in the bibliographic context, often attributed to the principles developed by Lubetzky. This was also supported by the work of the International Federation of Library Associations and Institutions on the Functional Requirements for Bibliographic Records (FRBR), which emphasized the role of the work in the bibliographic context. FRBR created a tiered view of the bibliographic entity from Item, Manifestation, Expression, to Work. Item refers to the physical form of the book. Manifestation refers to the publication. Expression meaning the translation of the book from other languages. Work refers to the content and ideas of the book. This view was incorporated into the cataloging rules subsequent to AACR2-R, known as Resource Description and Access (RDA).
=== England ===
The Bodleian Library at Oxford University developed its cataloging code in 1674. The code emphasized authorship, and books by the same author were listed together in the catalog.
We can trace the origins of modern library cataloging practice back to the 1830s and Anthony Panizzi's 91 rules. Panizzi's singular insight was that a large catalog needed consistency in its entries if it was to serve the user. The first major English-language cataloging code was that developed by Sir Anthony Panizzi for the British Museum catalog. Panizzi's 91 rules were approved by the British Museum in 1839, and published in 1841. The British Museum rules were revised up until 1936. The library departments of the British Museum became part of the new British Library in 1973.
=== Germany and Prussia ===
The Prussian government set standard rules called Preußische Instruktionen (PI) (Prussian Instructions) for all of its libraries in 1899.
These rules were based on the earlier Breslauer Instructionen of the University Library at Breslau by Karl Franz Otto Dziatzko.
The Prussian Instructions were a standardized system of cataloging rules. Titles in literature are arranged grammatically not mechanically and literature is entered under its title. These were adopted throughout Germany, Prussia and Austria.
After the adoption of the Paris Principles (PP) in 1961, Germany developed the Regeln für die alphabetische Katalogisierung (RAK) in 1976/1977.
The goal of the Paris Principles was to serve as a basis for international standardization in cataloging. Most of the cataloging codes that were developed worldwide since that time have followed the Paris Principles.
=== Cataloging codes ===
Cataloging codes prescribe which information about a bibliographic item is included in the entry and how this information is presented for the user; It may also aid to sort the entries in printing (parts of) the catalog.
Currently, most cataloging codes are similar to, or even based on, the International Standard Bibliographic Description (ISBD), a set of rules produced by the International Federation of Library Associations and Institutions (IFLA) to describe a wide range of library materials. These rules organize the bibliographic description of an item in the following eight areas: title and statement of responsibility (author or editor), edition, material specific details (for example, the scale of a map), publication and distribution, physical description (for example, number of pages), series, notes, and standard number (ISBN). There is an initiative called the Bibliographic Framework (BIBFRAME) that is "an initiative to evolve bibliographic description standards to a linked data model, in order to make bibliographic information more useful both within and outside the library community." The most commonly used cataloging code in the English-speaking world was the Anglo-American Cataloguing Rules, 2nd edition (AACR2). AACR2 provides rules for descriptive cataloging only and does not touch upon subject cataloging. AACR2 has been translated into many languages, for use around the world. The German-speaking world uses the Regeln für die alphabetische Katalogisierung (RAK), also based on ISBD. The Library of Congress implemented the transition to RDA from AACR2 in March 2013.
In subject databases such as Chemical Abstracts, MEDLINE and PsycINFO, the Common Communication Format (CCF) is meant to serve as a baseline standard. Different standards prevail in archives and museums, such as CIDOC-CRM. Resource Description and Access (RDA) is a recent attempt to make a standard that crosses the domains of cultural heritage institutions.
=== Digital formats ===
Most libraries currently use the MARC standards—first piloted from January 1966 to June 1968 —to encode and transport bibliographic data.
These standards have seen critiques in recent years for being old, unique to the library community, and difficult to work with computationally. The Library of Congress developed BIBFRAME in 2011, an RDA schema for expressing bibliographic data. BIBFRAME was revised and piloted in 2017 by the Library of Congress, but still is not available to the public. It will first be available to vendors to try out, but afterwards there will be a hybrid form of the system (MARC and BIBFRAME) until the data can be fully translated.
Library digital collections often use simpler digital formats to store their metadata. XML-based schemata, particularly Dublin Core and MODS, are typical for bibliographic data about these collections.
=== Transliteration ===
Library items that are written in a foreign script are, in some cases, transliterated to the script of the catalog. In the United States and some other countries, catalogers typically use the ALA-LC romanization tables for this work. If this is not done, there would need to be separate catalogs for each script.
== Ethical issues ==
Ferris maintains that catalogers, in using their judgment and specialized viewpoint, uphold the integrity of the catalog and also provide "added value" to the process of bibliographic control, resulting in added findability for a library's user community. This added value also has the power to harm, resulting in the denial of access to information. Mistakes and biases in cataloging records can "stigmatize groups of people with inaccurate or demeaning labels, and create the impression that certain points of view are more normal than others".
Social responsibility in cataloging is the "fair and equitable access to relevant, appropriate, accurate, and uncensored information in a timely manner and free of bias". In order to act ethically and in a socially responsible manner, catalogers should be aware of how their judgments benefit or harm findability. They should be careful to not misuse or misrepresent information through inaccurate or minimal-level cataloging and to not purposely or inadvertently censor information.
Bair states that it is the professional obligation of catalogers to supply thorough, accurate, high-quality surrogate records for databases and that catalogers also have an ethical obligation to "contribute to the fair and equitable access to information." Bair recommends that catalogers "actively participate in the development, reform, and fair application of cataloging rules, standards, and classifications, as well as information-storage and retrieval systems". As stated by Knowlton, access points "should be what a particular type of library patron would be most likely to search under -- regardless of the notion of universal bibliographic control."
A formal code of ethics for catalogers does not exist, and thus catalogers often follow library or departmental policy to resolve conflicts in cataloging. While the American Library Association created a "Code of Ethics", Ferris notes that it has been criticized for being too general to encompass the special skills that set catalogers apart from other library and information professionals. As stated by Tavani, a code of ethics for catalogers can "inspire, guide, educate, and discipline" (as cited in Bair, 2005, p. 22). Bair suggests that an effective code of ethics for catalogers should be aspirational and also "discuss specific conduct and actions in order to serve as a guide in actual situations". Bair has also laid out the beginnings for a formal code of cataloging ethics in "Toward a Code of Ethics for Cataloging."
== Criticism ==
Sanford Berman, former Head Cataloger of the Hennepin County Library in Minnetonka, Minnesota, has been a leading critic of biased headings in the Library of Congress Subject Headings. Berman's 1971 publication Prejudices and Antipathies: A Tract on the LC Subject Heads Concerning People (P&A) has sparked the movement to correct biased subject headings. In P&A, Berman listed 225 headings with proposed alterations, additions, or deletions and cross-references to "more accurately reflect the language used in addressing these topics, to rectify errors of bias, and to better guide librarians and readers to material of interest". Berman is well known for his "care packages," mailings containing clippings and other materials in support of changes to subject headings and against racism, sexism, homophobia, and governmental secrecy, among other areas for concern.
In "Three Decades Since Prejudices and Antipathies: A Study of Changes in the Library of Congress Subject Headings," Knowlton examines ways in which the Library of Congress Subject Headings (LCSH) has changed by compiling a table of changes described in P&A, followed by the current status of headings in question. Knowlton states that his intent for this table is to "show how many of Berman's proposed changes have been implemented" and "which areas of bias are still prevalent in LCSH." In the discussion of Knowlton's findings, it is revealed that of the 225 headings suggested for change by Berman, only 88 (39%) have been changed exactly or very closely to his suggestions (p. 127). Another 54 (24%) of headings have been changed but only partially resolve Berman's objections, and "(which) may leave other objectionable wording intact or introduce a different shade of bias." 80 (36%) headings were not changed at all according to Berman's suggestions.
=== Queer theory and cataloging ===
Building on Berman's critique of cataloging practices, queer theorists in library and information science such as Emily Drabinski, Amber Billey and K.R. Roberto have written about the implications of creating stable categorizations for gender identities. Utilizing queer theory in conjunction with library classification and cataloging requires perspectives that can present both ethically and politically sound viewpoints that support marginalized persons such as women, people of color, or members of the LGBTQ+ community. This work has resulted in the modification of RDA Rule 9.7, governing how gender is represented in record creation. At the ALA Midwinter meeting in January 2016, the controlled vocabulary for gender in RDA was abolished, allowing catalogers and libraries to describe a person's gender in whatever terms best represent that person.
== Cataloging terms ==
Main entry or access point generally refers to the first author named on the item. Additional authors are added as "added entries." In cases where no clear author is named, the title of the work is considered the main entry.
Authority control is a process of using a single, specific term for a person, place, or title to maintain consistency between access points within a catalog. Effective authority control prevents a user from having to search for multiple variations of a title, author, or term.
Cooperative cataloging refers to an approach in which libraries collaborate in the creation of bibliographic and authority records, establishing cataloging practices and utilizing systems that facilitate the use of shared records.
== See also ==
Anglo-American Cataloguing Rules – Library cataloging standard
Archival processing – Surveying, arranging, preserving collections
Bibliographer – Person who describes and lists books and other publications
Cataloging in Publication – Basic cataloging data for a work
Collaborative Cataloging – shared action of a group making bibliographic records available to its participants in order to prevent duplication of bibliographic recordsPages displaying wikidata descriptions as a fallback (shared cataloging)
Findability – the ease with which information can be identified when searching for itPages displaying wikidata descriptions as a fallback
Information architecture – Structural design of shared information
Information retrieval – Obtaining information resources relevant to an information need
ISO 690 – ISO standard for bibliographic referencing
Knowledge organization – Field of study related to Library and Information Science
Shared Cataloging Program – Digital library founded in 1997 by UC systemPages displaying short descriptions of redirect targets
Subject access point – technique for locating relevant materials by their topicsPages displaying wikidata descriptions as a fallback
== References ==
== Further reading ==
Cutter, Charles (1891). Rules for a Printed Dictionary Catalogue (3rd ed.). Washington, D.C.: Government Printing Office.
Joudrey, Daniel N.; Taylor, Arlene G.; Miller, David P. (2015). Introduction to Cataloging and Classification (11th ed.). Santa Barbara, CA: Libraries Unlimited/ABC-CLIO. ISBN 978-1-59884-856-4.
Smalley, J. 1991. “The French Cataloging Code of 1791, a Translation.” Library Quarterly 61 (1): 1–14.
Svenonius, Elaine, ed. (1989). The Conceptual foundations of descriptive cataloging. San Diego: Academic Press. ISBN 9780126782103.
Svenonius, Elaine (2009). The intellectual foundation of information organization (1st MIT Press paperback ed.). Cambridge, Mass.: MIT Press. ISBN 9780262512619.
Chan, Lois Mai (2007), Cataloging and classification (Third ed.), The Scarecrow Press, Inc., p. 321, ISBN 978-0-8108-5944-9, OL 9558667M, 0810859440
Weihs, Jean; Lewis, Shirley (1989). Nonbook materials: the organization of integrated collections (3rd ed.). Ottawa: Canadian Library Association. ISBN 978-0888022400. | Wikipedia/Cataloging_(library_science) |
Archival science, or archival studies, is the study and theory of building and curating archives, which are collections of documents, recordings, photographs and various other materials in physical or digital formats.
To build and curate an archive, one must acquire and evaluate the materials, and be able to access them later. To this end, archival science seeks to improve methods for appraising, storing, preserving, and processing (arranging and describing) collections of materials.
An archival record preserves data that is not intended to change. In order to be of value to society, archives must be trustworthy. Therefore, an archivist has a responsibility to authenticate archival materials, such as historical documents, and to ensure their reliability, integrity, and usability. Archival records must be what they claim to be; accurately represent the activity they were created for; present a coherent picture through an array of content; and be in usable condition in an accessible location.
An archive curator is called an archivist; the curation of an archive is called archive administration.
== History ==
Archival science emerged from diplomatics, the critical analysis of documents.
In 1540, Jacob von Rammingen (1510–1582) wrote the manuscript of the earliest known archival manual. He was an expert on registries (Registraturen), the German word for what later became known as archives.
Rammingen elaborated a registry for the Augsburg city council. However, since he could not attend the council meeting, he described the structure and management of the archives in writing. Although this is not the first work about archival science (Rammingen himself refers to earlier literature about record-keeping), earlier manuals were usually not published. Archival science had no formal beginning. Jacob von Rammingen's manual was printed in Heidelberg in 1571.
Traditionally, archival science has involved the study of methods for preserving items in climate-controlled storage facilities. It is also the study of cataloguing and accession, of retrieval and safe handling. The advent of digital documents along with the development of electronic databases has caused the field to re-evaluate its means and ends. While generally associated with museums and libraries, the field also can pertain to individuals who maintain private collections or business archives. Archival Science is taught in colleges and universities, usually under the umbrella of Information Science or paired with a History program.
A list of foundational thinkers in archival studies could include: American archivist Theodore Schellenberg and British archivist Sir Hilary Jenkinson. Some important archival thinkers of the past century include: Canadian archivist and scholar Terry Cook, South African archivist Verne Harris, Australian archival scholar Sue McKemmish, UCLA faculty and archival scholar Anne Gilliland, University of Michigan faculty and archival scholar Margaret Hedstrom, American archival scholar and University of Pittsburgh faculty member Richard Cox, Italian archival scholar and faculty at University of British Columbia Luciana Duranti, and American museum and archival scholar David Bearman.
== Standards ==
There is no universal set of laws or standards that governs the form or mission of archival institutions. The forms, functions, and mandates of archival programs and institutions tend to differ based on geographical location and language, the nature of the society in which they exist and the objectives of those in control of the archives. Instead, the current standards that have been provided and are most widely followed, such as the ICA standard, ISO standard, and DIRKS standard, act as working guidelines for archives to follow and adapt in ways that would best suit their respective needs.
Following the introduction of computer technology in archival repositories, beginning in the 1970s, archivists increasingly recognized the need to develop common standards for descriptive practice, in order to facilitate the dissemination of archival descriptive information. The standard developed by archivists in Canada, Rules for Archival Description, also known as RAD, was first published in 1990. As a standard, RAD aims to provide archivists with a consistent and common foundation for the description of archival material within a fonds, based on traditional archival principles. A comparable standard used in the United States is Describing Archives: A Content Standard, also known as DACS. These standards are in place to provide archivists with the tools for describing and making accessible archival material to the public.
Metadata comprises contextual data pertaining to a record or aggregate of records. In order to compile metadata consistently, so as to enhance the discoverability of archival materials for users, as well as support the care and preservation of the materials by the archival institution, archivists look to standards appropriate to various kinds of metadata for different purposes, including administration, description, preservation, and digital storage and retrieval. For example, common standards used by archivists for structuring descriptive metadata, which conveys information such as the form, extent, and content of archival materials, include Machine-Readable Cataloguing (MARC format), Encoded Archival Description (EAD), and Dublin core.
== Provenance in archival science ==
Provenance in archival science refers to the "origin or source of something; information regarding the origins, custody, and ownership of an item or collection". As a fundamental principle of archives, provenance refers to the individual, family, or organization that created or received the items in a collection. In practice, provenance dictates that records of different origins should be kept separate to preserve their context. As a methodology, provenance becomes a means of describing records at the series level.
=== The principle of provenance ===
Describing records at the series level to ensure that records of different origins are kept separate, provided an alternative to item-level manuscript cataloguing. The practice of provenance has two major concepts: "respect des fonds", and "original order". "Respect des fonds" rose from the conviction that records entering an archive have an essential connection to the person or office that generated and used them; archivists consider all the records originating with a particular administrative unit (whether former, or still existing) to be a separate archival grouping, or "fonds", and seek to preserve and describe the records accordingly, with close attention to evidence of how they were organized and maintained at the time they were created.: 167–168 "Original order", refers to keeping records "as nearly as possible in the same order of classification as obtained in the offices of origin", gives additional credibility to preserved records and to their originating "fonds". Records must be kept in the same order they were placed in the course of the official activity of the agency concerned; records are not to be artificially reorganized. Records kept in their original order are more likely to reveal the nature of the organizations which created them, and more importantly, of the order of activities out of which they emerged.
Not infrequently, practical considerations of storage mean that it is impossible to maintain the original order of records physically. In such cases, however, the original order should still be respected intellectually in the structure and arrangement of finding aids.
=== Practices before the emergence of provenance ===
Following the French Revolution, a newfound appreciation for historical records emerged in French society. Records began to "acquir[e] the dignity of national monuments", and their care was entrusted to scholars who were trained in libraries. The emphasis was on historical research, and it seemed obvious at the time that records should be arranged and catalogued in a manner that would "facilitate every kind of scholarly use". To support research, artificial systematic collections, often arranged by topic, were established and records were catalogued into these schemes. With archival documents approached from a librarianship perspective, records were organized according to classification schemes and their original context of creation were frequently lost or obscured. This form of archival arrangement has come to be known as the "historical manuscripts tradition".
=== Emergence of provenance ===
The principle of "respect des fonds" and of "original order" was adopted in Belgium and France about 1840 and spread throughout Europe during the following decades. Following the rise of state-run archives in France and Prussia, the increasing volume of modern records entering the archive made adherence to the manuscript tradition impossible; there were not enough resources to organize and classify each record. Provenance received its most pointed expression in the "Manual for the Arrangement and Description of Archives", a Dutch text published in 1898 and written by three Dutch archivists, Samuel Muller, Johan Feith, and Robert Fruin. This text provided the first description of the principle of provenance and argued that "original order" is an essential trait of archival arrangement and description.
Complementing the work of the Dutch archivists and supporting the concept of provenance were the historians of the era. Through subject-based classification aided research, historians began to concern themselves with objectivity in their source material. For its advocates, provenance provided an objective alternative to the generally subjective classification schemes borrowed from librarianship. Historians increasingly felt that records should be maintained in their original order to better reflect the activity out of which they emerged.
=== Debates ===
Although original order is a generally accepted principle, there has been some debate about applicability to personal archiving. Original order is not always ideal for personal archives. However, some archivists insist that personal records are created and maintained for much the same reason as organizational archives and should follow the same principles.
== Preservation in archival science ==
Preservation, as defined by the Society of American Archivists (SAA), is the act of protecting materials from physical deterioration or loss of information, ideally in a noninvasive way. The goal of preservation is to maintain as much originality as possible while retaining all the information which the material has to offer. Both scientific principles and professional practices are applied to this technique to be maximally effective. In an archival sense, preservation refers to the care of all the aggregates within a collection. Conservation can be included in this practice and often these two definitions overlap.
=== The beginnings of preservation ===
Preservation emerged with the establishment of the first central archives. In 1789, during the French Revolution, the Archives Nationales was established and later, in 1794, transformed into a central archive. This was the first independent national archive and its goal was to preserve and store documents and records as they were. This trend gained popularity and soon other countries began establishing national archives for the same reasons, to maintain and preserve their records as they were created and received.
Cultural and scientific change reinforced the concept and practice of preservation. In the late eighteenth century, many museums, national libraries, and national archives were established in Europe; therefore ensuring the preservation of their cultural heritage.
=== Archival preservation ===
Preservation, like provenance, is concerned with the proper representation of archival materials. Archivists are primarily concerned with maintaining the record, along with the context in which it was produced, and making this information accessible to the user.
Tout ensemble is a definition relating to preservation. This definition encompasses the idea of context and the importance of maintaining context. When a record is removed from its fellow records, it loses its meaning. In order to preserve a record it must be preserved in its original entirety or else it may lose its significance. This definition relates to the principle of provenance and respect des fonds as it similarly emphasizes the idea of the original record.
Metadata is key for the preservation of context within archival science. Metadata, as defined by the SAA, is "data about data". This data can help archivists locate a specific record, or a variety of records within a certain category. By assigning appropriate metadata to records or record aggregates, the archivist successfully preserves the entirety of the record and the context in which it was created. This allows for better accessibility and improves authenticity.
Physical maintenance is another key feature of preservation. There are many strategies to preserve archives properly: rehousing items in acid-free containers, storing items in climate controlled areas, and copying deteriorating items.
=== Digital preservation ===
Digital preservation involves the implementation of policies, strategies, and actions in order to ensure that digitized documents remain accurate and accessible over time. Due to newly emerging technologies, archives began to expand and require new forms of preservation. Archival collections expanded to include new media such as microfilm, audiofiles, visualfiles, moving images, and digital documents. Many of these new types of media have a shorter life expectancy than paper. Migration from older non-paper formats to newer non-paper formats is necessary for the preservation of digital media so they can remain accessible.
Metadata is an important part of digital preservation as it preserves the context, usage, and migration of a digital record. Similarly to traditional preservation, metadata is required to preserve the authenticity and accessibility of a record.
=== Information access ===
Preserved materials in digital archives can be accessed usually by specifying their metadata, or by content-based search such as full text search when using dedicated information retrieval approaches. These usually return results ranked in terms of their relevance to user queries. Novel retrieval methods for document archives can use other ranking factors such as contemporary relevance and temporal analogy.
== Critical archival studies ==
In 2002, the journal Archival Science published a series of articles that analyzed systems of power in archival practice, theory, and recordkeeping. This approach was described in 2017 by Punzalan, Caswell, and Sangwand as "critical archival studies". Critical archival studies applies critical theory to archival science, with the goal of developing and implementing archival practices that are more fully inclusive of matters pertaining to race, class, gender, sexuality, and ability. For example, it includes documentation of racist acts and references past omissions of such. There are synergies between critical archival studies and digital humanities, to work to resist oppression.
Archival studies have focused renewed concern on recognition and representation of indigenous, community, and human rights archives. Archival practice is increasingly alert to colonial and imperialist implications. Since 2016, the concept of "symbolic annihilation" has been used to describe the disappearance of communities through systematic or implicit lack of representation or under-representation in archives. It was initially adapted into the archival literature by Caswell from feminist uses of symbolic annihilation. This absence can also be found in archival policies as well as description and annotation practices. Preservation and usage of accurate language and descriptions of community archives ensures that community values are not neglected, and contributes to critical archival discussions regarding omissions in historical documentation.
Hughes-Watkins has demonstrated that mainstream archival institutions tend to preserve homogeneous, Eurocentric content within archival practice, with a significant lack of attention to other, diverse perspectives.
== Professional and advanced education ==
In 2002, the Society of American Archivists published guidelines for a graduate program in archival studies. The guidelines were most recently revised and re-approved in 2016.
Formal courses of study in archival science are available at the master's and doctoral level. A master's degree is typically a two-year professional program focusing on acquiring a knowledge base of archival skills (including digital records and access systems) whereas a doctorate is more broad in scope and includes critical inquiry of its archival practices, with graduates typically preparing for careers in research and teaching. Archival science students may have academic backgrounds in areas such as anthropology, economics, history, law, library science, museum studies or information science.
== Associations ==
=== Professional ===
Professional archivist associations seek to foster study and professional development:
=== Regional ===
Smaller professional regional associations provide more local professional development. These include the New England Archivists, Society of Rocky Mountain Archivists, Society of Ohio Archivists, Society of North Carolina Archivists, and Mid-Atlantic Regional Archives Conference.
== See also ==
== References ==
== External links ==
The Academy of Certified Archivists
Australian Society of Archivists | Wikipedia/Archival_science |
Information science is an academic field which is primarily concerned with analysis, collection, classification, manipulation, storage, retrieval, movement, dissemination, and protection of information. Practitioners within and outside the field study the application and the usage of knowledge in organizations in addition to the interaction between people, organizations, and any existing information systems with the aim of creating, replacing, improving, or understanding the information systems.
== Disciplines and related fields ==
Historically, information science has evolved as a transdisciplinary field, both drawing from and contributing to diverse domains.
=== Core foundations ===
Technical and computational: informatics, computer science, data science, network science, information theory, discrete mathematics, statistics and analytics
Information organization: library science, archival science, documentation science, knowledge representation, ontologies, organization studies
Human dimensions: human-computer interaction, cognitive psychology, information behavior, social epistemology, philosophy of information, information ethics and science and technology studies
=== Applied contexts ===
Information science methodologies are applied across numerous domains, reflecting the discipline's versatility and relevance. Key application areas include:
Health and life sciences: health informatics, bioinformatics
Cultural and social contexts: digital humanities, computational social science, social media analytics, social informatics, computational linguistics
Spatial information: geographic information science, environmental informatics
Organizational settings: knowledge management, business analytics, decision support systems, information economics
Security and governance: cybersecurity, intelligence analysis, information policy, IT law, legal informatics
Education and learning: educational technology, learning analytics
The interdisciplinary nature of information science continues to expand as new technological developments and social practices emerge, creating innovative research frontiers that bridge traditional disciplinary boundaries.
== Foundations ==
=== Scope and approach ===
Information science focuses on understanding problems from the perspective of the stakeholders involved and then applying information and other technologies as needed. In other words, it tackles systemic problems first rather than individual pieces of technology within that system. In this respect, one can see information science as a response to technological determinism, the belief that technology "develops by its own laws, that it realizes its own potential, limited only by the material resources available and the creativity of its developers. It must therefore be regarded as an autonomous system controlling and ultimately permeating all other subsystems of society."
Many universities have entire colleges, departments or schools devoted to the study of information science, while numerous information-science scholars work in disciplines such as communication, healthcare, computer science, law, and sociology. Several institutions have formed an I-School Caucus (see List of I-Schools), but numerous others besides these also have comprehensive information specializations.
Within information science, current issues as of 2013 include:
Human–computer interaction for science
Groupware
The Semantic Web
Value sensitive design
Iterative design processes
The ways people generate, use and find information
=== Definitions ===
The first known usage of the term "information science" was in 1955. An early definition of Information science (going back to 1968, the year when the American Documentation Institute renamed itself as the American Society for Information Science and Technology) states:
"Information science is that discipline that investigates the properties and behavior of information, the forces governing the flow of information, and the means of processing information for optimum accessibility and usability. It is concerned with that body of knowledge relating to the origination, collection, organization, storage, retrieval, interpretation, transmission, transformation, and utilization of information. This includes the authenticity of information representations in both natural and artificial systems, the use of codes for efficient message transmission, and the study of information processing devices and techniques such as computers and their programming systems. It is an interdisciplinary science derived from and related to such fields as mathematics, logic, linguistics, psychology, computer technology, operations research, the graphic arts, communications, management, and other similar fields. It has both a pure science component, which inquires into the subject without regard to its application, and an applied science component, which develops services and products." (Borko 1968, p. 3).
==== Related terms ====
Some authors use informatics as a synonym for information science. This is especially true when related to the concept developed by A. I. Mikhailov and other Soviet authors in the mid-1960s. The Mikhailov school saw informatics as a discipline related to the study of scientific information.
Informatics is difficult to precisely define because of the rapidly evolving and interdisciplinary nature of the field. Definitions reliant on the nature of the tools used for deriving meaningful information from data are emerging in Informatics academic programs.
Regional differences and international terminology complicate the problem. Some people note that much of what is called "Informatics" today was once called "Information Science" – at least in fields such as Medical Informatics. For example, when library scientists also began to use the phrase "Information Science" to refer to their work, the term "informatics" emerged:
in the United States as a response by computer scientists to distinguish their work from that of library science
in Britain as a term for a science of information that studies natural, as well as artificial or engineered, information-processing systems
Another term discussed as a synonym for "information studies" is "information systems". Brian Campbell Vickery's Information Systems (1973) placed information systems within IS. Ellis, Allen & Wilson (1999), on the other hand, provided a bibliometric investigation describing the relation between two different fields: "information science" and "information systems".
=== Philosophy of information ===
Philosophy of information studies conceptual issues arising at the intersection of psychology, computer science, information technology, and philosophy. It includes the investigation of the conceptual nature and basic principles of information, including its dynamics, utilisation and sciences, as well as the elaboration and application of information-theoretic and computational methodologies to its philosophical problems. Robert Hammarberg pointed out that there is no coherent distinction between information and data: "an Information Processing System (IPS) cannot process data except in terms of whatever representational language is inherent to it, [so] data could not even be apprehended by an IPS without becoming representational in nature, and thus losing their status of being raw, brute, facts."
=== Ontology ===
In science and information science, an ontology formally represents knowledge as a set of concepts within a domain, and the relationships between those concepts. It can be used to reason about the entities within that domain and may be used to describe the domain.
More specifically, an ontology is a model for describing the world that consists of a set of types, properties, and relationship types. Exactly what is provided around these varies, but they are the essentials of an ontology. There is also generally an expectation that there be a close resemblance between the real world and the features of the model in an ontology.
In theory, an ontology is a "formal, explicit specification of a shared conceptualisation". An ontology renders shared vocabulary and taxonomy which models a domain with the definition of objects and/or concepts and their properties and relations.
Ontologies are the structural frameworks for organizing information and are used in artificial intelligence, the Semantic Web, systems engineering, software engineering, biomedical informatics, library science, enterprise bookmarking, and information architecture as a form of knowledge representation about the world or some part of it. The creation of domain ontologies is also essential to the definition and use of an enterprise architecture framework.
=== Science or discipline? ===
Authors such as Ingwersen argue that informatology has problems defining its own boundaries with other disciplines. According to Popper "Information science operates busily on an ocean of commonsense practical applications, which increasingly involve the computer ... and on commonsense views of language, of communication, of knowledge and Information, computer science is in little better state". Other authors, such as Furner, deny that information science is a true science.
== Careers ==
=== Information scientist ===
An information scientist is an individual, usually with a relevant subject degree or high level of subject knowledge, who provides focused information to scientific and technical research staff in industry or to subject faculty and students in academia. The industry *information specialist/scientist* and the academic information subject specialist/librarian have, in general, similar subject background training, but the academic position holder will be required to hold a second advanced degree—e.g. Master of Library Science (MLS), Military Intelligence (MI), Master of Arts (MA)—in information and library studies in addition to a subject master's. The title also applies to an individual carrying out research in information science.
=== Systems analyst ===
A systems analyst works on creating, designing, and improving information systems for a specific need. Often systems analysts work with one or more businesses to evaluate and implement organizational processes and techniques for accessing information in order to improve efficiency and productivity within the organization(s).
=== Information professional ===
An information professional is an individual who preserves, organizes, and disseminates information. Information professionals are skilled in the organization and retrieval of recorded knowledge. Traditionally, their work has been with print materials, but these skills are being increasingly used with electronic, visual, audio, and digital materials. Information professionals work in a variety of public, private, non-profit, and academic institutions. Information professionals can also be found within organisational and industrial contexts, and are performing roles that include system design and development and system analysis.
== History ==
=== Early beginnings ===
Information science, in studying the collection, classification, manipulation, storage, retrieval and dissemination of information has origins in the common stock of human knowledge. Information analysis has been carried out by scholars at least as early as the time of the Assyrian Empire with the emergence of cultural depositories, what is today known as libraries and archives. Institutionally, information science emerged in the 19th century along with many other social science disciplines. As a science, however, it finds its institutional roots in the history of science, beginning with publication of the first issues of Philosophical Transactions, generally considered the first scientific journal, in 1665 by the Royal Society.
The institutionalization of science occurred throughout the 18th century. In 1731, Benjamin Franklin established the Library Company of Philadelphia, the first library owned by a group of public citizens, which quickly expanded beyond the realm of books and became a center of scientific experimentation, and which hosted public exhibitions of scientific experiments. Benjamin Franklin invested a town in Massachusetts with a collection of books that the town voted to make available to all free of charge, forming the first public library of the United States. Academie de Chirurgia (Paris) published Memoires pour les Chirurgiens, generally considered to be the first medical journal, in 1736. The American Philosophical Society, patterned on the Royal Society (London), was founded in Philadelphia in 1743. As numerous other scientific journals and societies were founded, Alois Senefelder developed the concept of lithography for use in mass printing work in Germany in 1796.
=== 19th century ===
By the 19th century the first signs of information science emerged as separate and distinct from other sciences and social sciences but in conjunction with communication and computation. In 1801, Joseph Marie Jacquard invented a punched card system to control operations of the cloth weaving loom in France. It was the first use of "memory storage of patterns" system. As chemistry journals emerged throughout the 1820s and 1830s, Charles Babbage developed his "difference engine", the first step towards the modern computer, in 1822 and his "analytical engine" by 1834. By 1843 Richard Hoe developed the rotary press, and in 1844 Samuel Morse sent the first public telegraph message. By 1848 William F. Poole begins the Index to Periodical Literature, the first general periodical literature index in the US.
In 1854 George Boole published An Investigation into Laws of Thought..., which lays the foundations for Boolean algebra, which is later used in information retrieval. In 1860 a congress was held at Karlsruhe Technische Hochschule to discuss the feasibility of establishing a systematic and rational nomenclature for chemistry. The congress did not reach any conclusive results, but several key participants returned home with Stanislao Cannizzaro's outline (1858), which ultimately convinces them of the validity of his scheme for calculating atomic weights.
By 1865, the Smithsonian Institution began a catalog of current scientific papers, which became the International Catalogue of Scientific Papers in 1902. The following year the Royal Society began publication of its Catalogue of Papers in London. In 1868, Christopher Sholes, Carlos Glidden, and S. W. Soule produced the first practical typewriter. By 1872 Lord Kelvin devised an analogue computer to predict the tides, and by 1875 Frank Stephen Baldwin was granted the first US patent for a practical calculating machine that performs four arithmetic functions. Alexander Graham Bell and Thomas Edison invented the telephone and phonograph in 1876 and 1877 respectively, and the American Library Association was founded in Philadelphia. In 1879 Index Medicus was first issued by the Library of the Surgeon General, U.S. Army, with John Shaw Billings as librarian, and later the library issues Index Catalogue, which achieved an international reputation as the most complete catalog of medical literature.
=== European documentation ===
The discipline of documentation science, which marks the earliest theoretical foundations of modern information science, emerged in the late part of the 19th century in Europe together with several more scientific indexes whose purpose was to organize scholarly literature. Many information science historians cite Paul Otlet and Henri La Fontaine as the fathers of information science with the founding of the International Institute of Bibliography (IIB) in 1895. A second generation of European Documentalists emerged after the Second World War, most notably Suzanne Briet. However, "information science" as a term is not popularly used in academia until sometime in the latter part of the 20th century.
Documentalists emphasized the utilitarian integration of technology and technique toward specific social goals. According to Ronald Day, "As an organized system of techniques and technologies, documentation was understood as a player in the historical development of global organization in modernity – indeed, a major player inasmuch as that organization was dependent on the organization and transmission of information." Otlet and Lafontaine (who won the Nobel Prize in 1913) not only envisioned later technical innovations but also projected a global vision for information and information technologies that speaks directly to postwar visions of a global "information society". Otlet and Lafontaine established numerous organizations dedicated to standardization, bibliography, international associations, and consequently, international cooperation. These organizations were fundamental for ensuring international production in commerce, information, communication and modern economic development, and they later found their global form in such institutions as the League of Nations and the United Nations. Otlet designed the Universal Decimal Classification, based on Melville Dewey's decimal classification system.
Although he lived decades before computers and networks emerged, what he discussed prefigured what ultimately became the World Wide Web. His vision of a great network of knowledge focused on documents and included the notions of hyperlinks, search engines, remote access, and social networks.
Otlet not only imagined that all the world's knowledge should be interlinked and made available remotely to anyone, but he also proceeded to build a structured document collection. This collection involved standardized paper sheets and cards filed in custom-designed cabinets according to a hierarchical index (which culled information worldwide from diverse sources) and a commercial information retrieval service (which answered written requests by copying relevant information from index cards). Users of this service were even warned if their query was likely to produce more than 50 results per search.
By 1937 documentation had formally been institutionalized, as evidenced by the founding of the American Documentation Institute (ADI), later called the American Society for Information Science and Technology.
=== Transition to modern information science ===
With the 1950s came increasing awareness of the potential of automatic devices for literature searching and information storage and retrieval. As these concepts grew in magnitude and potential, so did the variety of information science interests. By the 1960s and 70s, there was a move from batch processing to online modes, from mainframe to mini and microcomputers. Additionally, traditional boundaries among disciplines began to fade and many information science scholars joined with other programs. They further made themselves multidisciplinary by incorporating disciplines in the sciences, humanities and social sciences, as well as other professional programs, such as law and medicine in their curriculum.
Among the individuals who had distinct opportunities to facilitate interdisciplinary activity targeted at scientific communication was Foster E. Mohrhardt, director of the National Agricultural Library from 1954 to 1968.
By the 1980s, large databases, such as Grateful Med at the National Library of Medicine, and user-oriented services such as Dialog and Compuserve, were for the first time accessible by individuals from their personal computers. The 1980s also saw the emergence of numerous special interest groups to respond to the changes. By the end of the decade, special interest groups were available involving non-print media, social sciences, energy and the environment, and community information systems. Today, information science largely examines technical bases, social consequences, and theoretical understanding of online databases, widespread use of databases in government, industry, and education, and the development of the Internet and World Wide Web.
== Information dissemination in the 21st century ==
=== Changing definition ===
Dissemination has historically been interpreted as unilateral communication of information. With the advent of the internet, and the explosion in popularity of online communities, social media has changed the information landscape in many respects, and creates both new modes of communication and new types of information", changing the interpretation of the definition of dissemination. The nature of social networks allows for faster diffusion of information than through organizational sources. The internet has changed the way we view, use, create, and store information; now it is time to re-evaluate the way we share and spread it.
=== Impact of social media on people and industry ===
Social media networks provide an open information environment for the mass of people who have limited time or access to traditional outlets of information diffusion, this is an "increasingly mobile and social world [that] demands...new types of information skills". Social media integration as an access point is a very useful and mutually beneficial tool for users and providers. All major news providers have visibility and an access point through networks such as Facebook and Twitter maximizing their breadth of audience. Through social media people are directed to, or provided with, information by people they know. The ability to "share, like, and comment on...content" increases the reach farther and wider than traditional methods. People like to interact with information, they enjoy including the people they know in their circle of knowledge. Sharing through social media has become so influential that publishers must "play nice" if they desire to succeed. Although, it is often mutually beneficial for publishers and Facebook to "share, promote and uncover new content" to improve both user base experiences. The impact of popular opinion can spread in unimaginable ways. Social media allows interaction through simple to learn and access tools; The Wall Street Journal offers an app through Facebook, and The Washington Post goes a step further and offers an independent social app that was downloaded by 19.5 million users in six months, proving how interested people are in the new way of being provided information.
=== Social media's power to facilitate topics ===
The connections and networks sustained through social media help information providers learn what is important to people. The connections people have throughout the world enable the exchange of information at an unprecedented rate. It is for this reason that these networks have been realized for the potential they provide. "Most news media monitor Twitter for breaking news", as well as news anchors frequently request the audience to tweet pictures of events. The users and viewers of the shared information have earned "opinion-making and agenda-setting power" This channel has been recognized for the usefulness of providing targeted information based on public demand.
== Research sectors and applications ==
The following areas are some of those that information science investigates and develops.
=== Information access ===
Information access is an area of research at the intersection of Informatics, Information Science, Information Security, Language Technology, and Computer Science. The objectives of information access research are to automate the processing of large and unwieldy amounts of information and to simplify users' access to it. What about assigning privileges and restricting access to unauthorized users? The extent of access should be defined in the level of clearance granted for the information. Applicable technologies include information retrieval, text mining, text editing, machine translation, and text categorisation. In discussion, information access is often defined as concerning the insurance of free and closed or public access to information and is brought up in discussions on copyright, patent law, and public domain. Public libraries need resources to provide knowledge of information assurance.
=== Information architecture ===
Information architecture (IA) is the art and science of organizing and labelling websites, intranets, online communities and software to support usability. It is an emerging discipline and community of practice focused on bringing together principles of design and architecture to the digital landscape. Typically it involves a model or concept of information which is used and applied to activities that require explicit details of complex information systems. These activities include library systems and database development.
=== Information management ===
Information management (IM) is the collection and management of information from one or more sources and the distribution of that information to one or more audiences. This sometimes involves those who have a stake in, or a right to that information. Management means the organization of and control over the structure, processing and delivery of information. Throughout the 1970s this was largely limited to files, file maintenance, and the life cycle management of paper-based files, other media and records. With the proliferation of information technology starting in the 1970s, the job of information management took on a new light and also began to include the field of data maintenance.
=== Information retrieval ===
Information retrieval (IR) is the area of study concerned with searching for documents, for information within documents, and for metadata about documents, as well as that of searching structured storage, relational databases, and the World Wide Web. Automated information retrieval systems are used to reduce what has been called "information overload". Many universities and public libraries use IR systems to provide access to books, journals and other documents. Web search engines are the most visible IR applications.
An information retrieval process begins when a user enters a query into the system. Queries are formal statements of information needs, for example search strings in web search engines. In information retrieval a query does not uniquely identify a single object in the collection. Instead, several objects may match the query, perhaps with different degrees of relevancy.
An object is an entity that is represented by information in a database. User queries are matched against the database information. Depending on the application the data objects may be, for example, text documents, images, audio, mind maps or videos. Often the documents themselves are not kept or stored directly in the IR system, but are instead represented in the system by document surrogates or metadata.
Most IR systems compute a numeric score on how well each object in the database match the query, and rank the objects according to this value. The top ranking objects are then shown to the user. The process may then be iterated if the user wishes to refine the query.
=== Information seeking ===
Information seeking is the process or activity of attempting to obtain information in both human and technological contexts. Information seeking is related to, but different from, information retrieval (IR).
Much library and information science (LIS) research has focused on the information-seeking practices of practitioners within various fields of professional work. Studies have been carried out into the information-seeking behaviors of librarians, academics, medical professionals, engineers and lawyers (among others). Much of this research has drawn on the work done by Leckie, Pettigrew (now Fisher) and Sylvain, who in 1996 conducted an extensive review of the LIS literature (as well as the literature of other academic fields) on professionals' information seeking. The authors proposed an analytic model of professionals' information seeking behaviour, intended to be generalizable across the professions, thus providing a platform for future research in the area. The model was intended to "prompt new insights... and give rise to more refined and applicable theories of information seeking" (Leckie, Pettigrew & Sylvain 1996, p. 188). The model has been adapted by Wilkinson (2001) who proposes a model of the information seeking of lawyers. Recent studies in this topic address the concept of information-gathering that "provides a broader perspective that adheres better to professionals' work-related reality and desired skills." (Solomon & Bronstein 2021).
=== Information society ===
An information society is a society where the creation, distribution, diffusion, uses, integration and manipulation of information is a significant economic, political, and cultural activity. The aim of an information society is to gain competitive advantage internationally, through using IT in a creative and productive way. The knowledge economy is its economic counterpart, whereby wealth is created through the economic exploitation of understanding. People who have the means to partake in this form of society are sometimes called digital citizens.
Basically, an information society is the means of getting information from one place to another (Wark 1997, p. 22). As technology has become more advanced over time so too has the way we have adapted in sharing this information with each other.
Information society theory discusses the role of information and information technology in society, the question of which key concepts should be used for characterizing contemporary society, and how to define such concepts. It has become a specific branch of contemporary sociology.
=== Knowledge representation and reasoning ===
Knowledge representation (KR) is an area of artificial intelligence research aimed at representing knowledge in symbols to facilitate inferencing from those knowledge elements, creating new elements of knowledge. The KR can be made to be independent of the underlying knowledge model or knowledge base system (KBS) such as a semantic network.
Knowledge Representation (KR) research involves analysis of how to reason accurately and effectively and how best to use a set of symbols to represent a set of facts within a knowledge domain. A symbol vocabulary and a system of logic are combined to enable inferences about elements in the KR to create new KR sentences. Logic is used to supply formal semantics of how reasoning functions should be applied to the symbols in the KR system. Logic is also used to define how operators can process and reshape the knowledge. Examples of operators and operations include, negation, conjunction, adverbs, adjectives, quantifiers and modal operators. The logic is interpretation theory. These elements—symbols, operators, and interpretation theory—are what give sequences of symbols meaning within a KR.
== See also ==
Computer and information science
Category:Information science journals
List of computer science awards § Information science awards
Outline of information science
Outline of information technology
== References ==
== Sources ==
Borko, H. (1968). "Information science: What is it?". American Documentation. 19 (1). Wiley: 3–5. doi:10.1002/asi.5090190103. ISSN 0096-946X.
Leckie, Gloria J.; Pettigrew, Karen E.; Sylvain, Christian (1996). "Modeling the information seeking of professionals: A general model derived from research on engineers, health care professionals, and lawyers". Library Quarterly. 66 (2): 161–193. doi:10.1086/602864. S2CID 7829155.
Wark, McKenzie (1997). The Virtual Republic. Allen & Unwin, St Leonards.
Wilkinson, Margaret A (2001). "Information sources used by lawyers in problem-solving: An empirical exploration". Library & Information Science Research. 23 (3): 257–276. doi:10.1016/s0740-8188(01)00082-2. S2CID 59067811.
== Further reading ==
Khosrow-Pour, Mehdi (22 March 2005). Encyclopedia of Information Science and Technology. Idea Group Reference. ISBN 978-1-59140-553-5.
== External links ==
American Society for Information Science and Technology, a "professional association that bridges the gap between information science practice and research. ASIS&T members represent the fields of information science, computer science, linguistics, management, librarianship, engineering, data science, information architecture, law, medicine, chemistry, education, and related technology".
iSchools
Knowledge Map of Information Science
Journal of Information Science
Digital Library of Information Science and Technology open access archive for the Information Sciences
Current Information Science Research at U.S. Geological Survey
Introduction to Information Science Archived 2021-05-13 at the Wayback Machine
The Nitecki Trilogy
Information science at the University of California at Berkeley in the 1960s: a memoir of student days
Chronology of Information Science and Technology Archived 2011-05-14 at the Wayback Machine
LIBRES – Library and Information Science Research Electronic Journal -
Shared decision-making | Wikipedia/Information_Sciences |
Information retrieval (IR) in computing and information science is the task of identifying and retrieving information system resources that are relevant to an information need. The information need can be specified in the form of a search query. In the case of document retrieval, queries can be based on full-text or other content-based indexing. Information retrieval is the science of searching for information in a document, searching for documents themselves, and also searching for the metadata that describes data, and for databases of texts, images or sounds.
Automated information retrieval systems are used to reduce what has been called information overload. An IR system is a software system that provides access to books, journals and other documents; it also stores and manages those documents. Web search engines are the most visible IR applications.
== Overview ==
An information retrieval process begins when a user enters a query into the system. Queries are formal statements of information needs, for example search strings in web search engines. In information retrieval, a query does not uniquely identify a single object in the collection. Instead, several objects may match the query, perhaps with different degrees of relevance.
An object is an entity that is represented by information in a content collection or database. User queries are matched against the database information. However, as opposed to classical SQL queries of a database, in information retrieval the results returned may or may not match the query, so results are typically ranked. This ranking of results is a key difference of information retrieval searching compared to database searching.
Depending on the application the data objects may be, for example, text documents, images, audio, mind maps or videos. Often the documents themselves are not kept or stored directly in the IR system, but are instead represented in the system by document surrogates or metadata.
Most IR systems compute a numeric score on how well each object in the database matches the query, and rank the objects according to this value. The top ranking objects are then shown to the user. The process may then be iterated if the user wishes to refine the query.
== History ==
there is ... a machine called the Univac ... whereby letters and figures are coded as a pattern of magnetic spots on a long steel tape. By this means the text of a document, preceded by its subject code symbol, can be recorded ... the machine ... automatically selects and types out those references which have been coded in any desired way at a rate of 120 words a minute
The idea of using computers to search for relevant pieces of information was popularized in the article As We May Think by Vannevar Bush in 1945. It would appear that Bush was inspired by patents for a 'statistical machine' – filed by Emanuel Goldberg in the 1920s and 1930s – that searched for documents stored on film. The first description of a computer searching for information was described by Holmstrom in 1948, detailing an early mention of the Univac computer. Automated information retrieval systems were introduced in the 1950s: one even featured in the 1957 romantic comedy Desk Set. In the 1960s, the first large information retrieval research group was formed by Gerard Salton at Cornell. By the 1970s several different retrieval techniques had been shown to perform well on small text corpora such as the Cranfield collection (several thousand documents). Large-scale retrieval systems, such as the Lockheed Dialog system, came into use early in the 1970s.
In 1992, the US Department of Defense along with the National Institute of Standards and Technology (NIST), cosponsored the Text Retrieval Conference (TREC) as part of the TIPSTER text program. The aim of this was to look into the information retrieval community by supplying the infrastructure that was needed for evaluation of text retrieval methodologies on a very large text collection. This catalyzed research on methods that scale to huge corpora. The introduction of web search engines has boosted the need for very large scale retrieval systems even further.
By the late 1990s, the rise of the World Wide Web fundamentally transformed information retrieval. While early search engines such as AltaVista (1995) and Yahoo! (1994) offered keyword-based retrieval, they were limited in scale and ranking refinement. The breakthrough came in 1998 with the founding of Google, which introduced the PageRank algorithm, using the web’s hyperlink structure to assess page importance and improve relevance ranking.
During the 2000s, web search systems evolved rapidly with the integration of machine learning techniques. These systems began to incorporate user behavior data (e.g., click-through logs), query reformulation, and content-based signals to improve search accuracy and personalization. In 2009, Microsoft launched Bing, introducing features that would later incorporate semantic web technologies through the development of its Satori knowledge base. Academic analysis have highlighted Bing’s semantic capabilities, including structured data use and entity recognition, as part of a broader industry shift toward improving search relevance and understanding user intent through natural language processing.
A major leap occurred in 2018, when Google deployed BERT (Bidirectional Encoder Representations from Transformers) to better understand the contextual meaning of queries and documents. This marked one of the first times deep neural language models were used at scale in real-world retrieval systems. BERT’s bidirectional training enabled a more refined comprehension of word relationships in context, improving the handling of natural language queries. Because of its success, transformer-based models gained traction in academic research and commercial search applications.
Simultaneously, the research community began exploring neural ranking models that outperformed traditional lexical-based methods. Long-standing benchmarks such as the Text REtrieval Conference (TREC), initiated in 1992, and more recent evaluation frameworks Microsoft MARCO(MAchine Reading COmprehension) (2019) became central to training and evaluating retrieval systems across multiple tasks and domains. MS MARCO has also been adopted in the TREC Deep Learning Tracks, where it serves as a core dataset for evaluating advances in neural ranking models within a standardized benchmarking environment.
As deep learning became integral to information retrieval systems, researchers began to categorize neural approaches into three broad classes: sparse, dense, and hybrid models. Sparse models, including traditional term-based methods and learned variants like SPLADE, rely on interpretable representations and inverted indexes to enable efficient exact term matching with added semantic signals. Dense models, such as dual-encoder architectures like ColBERT, use continuous vector embeddings to support semantic similarity beyond keyword overlap. Hybrid models aim to combine the advantages of both, balancing the lexical (token) precision of sparse methods with the semantic depth of dense models. This way of categorizing models balances scalability, relevance, and efficiency in retrieval systems.
As IR systems increasingly rely on deep learning, concerns around bias, fairness, and explainability have also come to the picture. Research is now focused not just on relevance and efficiency, but on transparency, accountability, and user trust in retrieval algorithms.
== Applications ==
Areas where information retrieval techniques are employed include (the entries are in alphabetical order within each category):
=== General applications ===
Digital libraries
Information filtering
Recommender systems
Media search
Blog search
Image retrieval
3D retrieval
Music retrieval
News search
Speech retrieval
Video retrieval
Search engines
Site search
Desktop search
Enterprise search
Federated search
Mobile search
Social search
Web search
=== Domain-specific applications ===
Expert search finding
Genomic information retrieval
Geographic information retrieval
Information retrieval for chemical structures
Information retrieval in software engineering
Legal information retrieval
Vertical search
=== Other retrieval methods ===
Methods/Techniques in which information retrieval techniques are employed include:
Adversarial information retrieval
Automatic summarization
Multi-document summarization
Compound term processing
Cross-lingual retrieval
Document classification
Spam filtering
Question answering
== Model types ==
In order to effectively retrieve relevant documents by IR strategies, the documents are typically transformed into a suitable representation. Each retrieval strategy incorporates a specific model for its document representation purposes. The picture on the right illustrates the relationship of some common models. In the picture, the models are categorized according to two dimensions: the mathematical basis and the properties of the model.
=== First dimension: mathematical basis ===
Set-theoretic models represent documents as sets of words or phrases. Similarities are usually derived from set-theoretic operations on those sets. Common models are:
Standard Boolean model
Extended Boolean model
Fuzzy retrieval
Algebraic models represent documents and queries usually as vectors, matrices, or tuples. The similarity of the query vector and document vector is represented as a scalar value.
Vector space model
Generalized vector space model
(Enhanced) Topic-based Vector Space Model
Extended Boolean model
Latent semantic indexing a.k.a. latent semantic analysis
Probabilistic models treat the process of document retrieval as a probabilistic inference. Similarities are computed as probabilities that a document is relevant for a given query. Probabilistic theorems like Bayes' theorem are often used in these models.
Binary Independence Model
Probabilistic relevance model on which is based the okapi (BM25) relevance function
Uncertain inference
Language models
Divergence-from-randomness model
Latent Dirichlet allocation
Feature-based retrieval models view documents as vectors of values of feature functions (or just features) and seek the best way to combine these features into a single relevance score, typically by learning to rank methods. Feature functions are arbitrary functions of document and query, and as such can easily incorporate almost any other retrieval model as just another feature.
=== Second dimension: properties of the model ===
Models without term-interdependencies treat different terms/words as independent. This fact is usually represented in vector space models by the orthogonality assumption of term vectors or in probabilistic models by an independency assumption for term variables.
Models with immanent term interdependencies allow a representation of interdependencies between terms. However the degree of the interdependency between two terms is defined by the model itself. It is usually directly or indirectly derived (e.g. by dimensional reduction) from the co-occurrence of those terms in the whole set of documents.
Models with transcendent term interdependencies allow a representation of interdependencies between terms, but they do not allege how the interdependency between two terms is defined. They rely on an external source for the degree of interdependency between two terms. (For example, a human or sophisticated algorithms.)
=== Third Dimension: representational approach-based classification ===
In addition to the theoretical distinctions, modern information retrieval models are also categorized on how queries and documents are represented and compared, using a practical classification distinguishing between sparse, dense and hybrid models.
Sparse models utilize interpretable, term-based representations and typically rely on inverted index structures. Classical methods such as TF-IDF and BM25 fall under this category, along with more recent learned sparse models that integrate neural architectures while retaining sparsity.
Dense models represent queries and documents as continuous vectors using deep learning models, typically transformer-based encoders. These models enable semantic similarity matching beyond exact term overlap and are used in tasks involving semantic search and question answering.
Hybrid models aim to combine the strengths of both approaches, integrating lexical (tokens) and semantic signals through score fusion, late interaction, or multi-stage ranking pipelines.
This classification has become increasingly common in both academic and the real world applications and is getting widely adopted and used in evaluation benchmarks for Information Retrieval models.
== Performance and correctness measures ==
The evaluation of an information retrieval system' is the process of assessing how well a system meets the information needs of its users. In general, measurement considers a collection of documents to be searched and a search query. Traditional evaluation metrics, designed for Boolean retrieval or top-k retrieval, include precision and recall. All measures assume a ground truth notion of relevance: every document is known to be either relevant or non-relevant to a particular query. In practice, queries may be ill-posed and there may be different shades of relevance.
== Libraries for searching and indexing ==
Lemur
Lucene
Solr
Elasticsearch
Manatee
Manticore search
Sphinx
Terrier Search Engine
Xapian
== Timeline ==
Before the 1900s
1801: Joseph Marie Jacquard invents the Jacquard loom, the first machine to use punched cards to control a sequence of operations.
1880s: Herman Hollerith invents an electro-mechanical data tabulator using punch cards as a machine readable medium.
1890 Hollerith cards, keypunches and tabulators used to process the 1890 US census data.
1920s–1930s
Emanuel Goldberg submits patents for his "Statistical Machine", a document search engine that used photoelectric cells and pattern recognition to search the metadata on rolls of microfilmed documents.
1940s–1950s
late 1940s: The US military confronted problems of indexing and retrieval of wartime scientific research documents captured from Germans.
1945: Vannevar Bush's As We May Think appeared in Atlantic Monthly.
1947: Hans Peter Luhn (research engineer at IBM since 1941) began work on a mechanized punch card-based system for searching chemical compounds.
1950s: Growing concern in the US for a "science gap" with the USSR motivated, encouraged funding and provided a backdrop for mechanized literature searching systems (Allen Kent et al.) and the invention of the citation index by Eugene Garfield.
1950: The term "information retrieval" was coined by Calvin Mooers.
1951: Philip Bagley conducted the earliest experiment in computerized document retrieval in a master thesis at MIT.
1955: Allen Kent joined Case Western Reserve University, and eventually became associate director of the Center for Documentation and Communications Research. That same year, Kent and colleagues published a paper in American Documentation describing the precision and recall measures as well as detailing a proposed "framework" for evaluating an IR system which included statistical sampling methods for determining the number of relevant documents not retrieved.
1958: International Conference on Scientific Information Washington DC included consideration of IR systems as a solution to problems identified. See: Proceedings of the International Conference on Scientific Information, 1958 (National Academy of Sciences, Washington, DC, 1959)
1959: Hans Peter Luhn published "Auto-encoding of documents for information retrieval".
1960s:
early 1960s: Gerard Salton began work on IR at Harvard, later moved to Cornell.
1960: Melvin Earl Maron and John Lary Kuhns published "On relevance, probabilistic indexing, and information retrieval" in the Journal of the ACM 7(3):216–244, July 1960.
1962:
Cyril W. Cleverdon published early findings of the Cranfield studies, developing a model for IR system evaluation. See: Cyril W. Cleverdon, "Report on the Testing and Analysis of an Investigation into the Comparative Efficiency of Indexing Systems". Cranfield Collection of Aeronautics, Cranfield, England, 1962.
Kent published Information Analysis and Retrieval.
1963:
Weinberg report "Science, Government and Information" gave a full articulation of the idea of a "crisis of scientific information". The report was named after Dr. Alvin Weinberg.
Joseph Becker and Robert M. Hayes published text on information retrieval. Becker, Joseph; Hayes, Robert Mayo. Information storage and retrieval: tools, elements, theories. New York, Wiley (1963).
1964:
Karen Spärck Jones finished her thesis at Cambridge, Synonymy and Semantic Classification, and continued work on computational linguistics as it applies to IR.
The National Bureau of Standards sponsored a symposium titled "Statistical Association Methods for Mechanized Documentation". Several highly significant papers, including G. Salton's first published reference (we believe) to the SMART system.
mid-1960s:
National Library of Medicine developed MEDLARS Medical Literature Analysis and Retrieval System, the first major machine-readable database and batch-retrieval system.
Project Intrex at MIT.
1965: J. C. R. Licklider published Libraries of the Future.
1966: Don Swanson was involved in studies at University of Chicago on Requirements for Future Catalogs.
late 1960s: F. Wilfrid Lancaster completed evaluation studies of the MEDLARS system and published the first edition of his text on information retrieval.
1968:
Gerard Salton published Automatic Information Organization and Retrieval.
John W. Sammon, Jr.'s RADC Tech report "Some Mathematics of Information Storage and Retrieval..." outlined the vector model.
1969: Sammon's "A nonlinear mapping for data structure analysis Archived 2017-08-08 at the Wayback Machine" (IEEE Transactions on Computers) was the first proposal for visualization interface to an IR system.
1970s
early 1970s:
First online systems—NLM's AIM-TWX, MEDLINE; Lockheed's Dialog; SDC's ORBIT.
Theodor Nelson promoting concept of hypertext, published Computer Lib/Dream Machines.
1971: Nicholas Jardine and Cornelis J. van Rijsbergen published "The use of hierarchic clustering in information retrieval", which articulated the "cluster hypothesis".
1975: Three highly influential publications by Salton fully articulated his vector processing framework and term discrimination model:
A Theory of Indexing (Society for Industrial and Applied Mathematics)
A Theory of Term Importance in Automatic Text Analysis (JASIS v. 26)
A Vector Space Model for Automatic Indexing (CACM 18:11)
1978: The First ACM SIGIR conference.
1979: C. J. van Rijsbergen published Information Retrieval (Butterworths). Heavy emphasis on probabilistic models.
1979: Tamas Doszkocs implemented the CITE natural language user interface for MEDLINE at the National Library of Medicine. The CITE system supported free form query input, ranked output and relevance feedback.
1980s
1980: First international ACM SIGIR conference, joint with British Computer Society IR group in Cambridge.
1982: Nicholas J. Belkin, Robert N. Oddy, and Helen M. Brooks proposed the ASK (Anomalous State of Knowledge) viewpoint for information retrieval. This was an important concept, though their automated analysis tool proved ultimately disappointing.
1983: Salton (and Michael J. McGill) published Introduction to Modern Information Retrieval (McGraw-Hill), with heavy emphasis on vector models.
1985: David Blair and Bill Maron publish: An Evaluation of Retrieval Effectiveness for a Full-Text Document-Retrieval System
mid-1980s: Efforts to develop end-user versions of commercial IR systems.
1985–1993: Key papers on and experimental systems for visualization interfaces.
Work by Donald B. Crouch, Robert R. Korfhage, Matthew Chalmers, Anselm Spoerri and others.
1989: First World Wide Web proposals by Tim Berners-Lee at CERN.
1990s
1992: First TREC conference.
1997: Publication of Korfhage's Information Storage and Retrieval with emphasis on visualization and multi-reference point systems.
1998: Google is founded by Larry Page and Sergey Brin. It introduces the PageRank algorithm, which evaluates the importance of web pages based on hyperlink structure.
1999: Publication of Ricardo Baeza-Yates and Berthier Ribeiro-Neto's Modern Information Retrieval by Addison Wesley, the first book that attempts to cover all IR.
2000s
2001: Wikipedia launches as a free, collaborative online encyclopedia. It quickly becomes a major resource for information retrieval, particularly for natural language processing and semantic search benchmarks.
2009: Microsoft launches Bing, introducing features such as related searches, semantic suggestions, and later incorporating deep learning techniques into its ranking algorithms.
2010s
2013: Google’s Hummingbird algorithm goes live, marking a shift from keyword matching toward understanding query intent and semantic context in search queries.
2018: Google AI researchers release BERT (Bidirectional Encoder Representations from Transformers), enabling deep bidirectional understanding of language and improving document ranking and query understanding in IR.
2019: Microsoft introduces MS MARCO (Microsoft MAchine Reading COmprehension), a large-scale dataset designed for training and evaluating machine reading and passage ranking models.
2020s
2020: The ColBERT (Contextualized Late Interaction over BERT) model, designed for efficient passage retrieval using contextualized embeddings, was introduced at SIGIR 2020.
2021: SPLADE is introduced at SIGIR 2021. It’s a sparse neural retrieval model that balances lexical and semantic features using masked language modeling and sparsity regularization.
2022: The BEIR benchmark is released to evaluate zero-shot IR across 18 datasets covering diverse tasks. It standardizes comparisons between dense, sparse, and hybrid IR models.
== Major conferences ==
SIGIR: Special Interest Group on Information Retrieval
ECIR: European Conference on Information Retrieval
CIKM: Conference on Information and Knowledge Management
WWW: International World Wide Web Conference
== Awards in the field ==
Tony Kent Strix award
Gerard Salton Award
Karen Spärck Jones Award
== See also ==
== References ==
== Further reading ==
Ricardo Baeza-Yates, Berthier Ribeiro-Neto. Modern Information Retrieval: The Concepts and Technology behind Search (second edition) Archived 2017-09-18 at the Wayback Machine. Addison-Wesley, UK, 2011.
Stefan Büttcher, Charles L. A. Clarke, and Gordon V. Cormack. Information Retrieval: Implementing and Evaluating Search Engines Archived 2020-10-05 at the Wayback Machine. MIT Press, Cambridge, Massachusetts, 2010.
"Information Retrieval System". Library & Information Science Network. 24 April 2015. Archived from the original on 11 May 2020. Retrieved 3 May 2020.
Christopher D. Manning, Prabhakar Raghavan, and Hinrich Schütze. Introduction to Information Retrieval. Cambridge University Press, 2008.
Yeo, ShinJoung. (2023) Behind the Search Box: Google and the Global Internet Industry (U of Illinois Press, 2023) ISBN 0252087127 online
== External links ==
ACM SIGIR: Information Retrieval Special Interest Group
BCS IRSG: British Computer Society – Information Retrieval Specialist Group
Text Retrieval Conference (TREC)
Forum for Information Retrieval Evaluation (FIRE)
Information Retrieval (online book) by C. J. van Rijsbergen
Information Retrieval Wiki Archived 2015-11-24 at the Wayback Machine
Information Retrieval Facility Archived 2008-05-22 at the Wayback Machine
TREC report on information retrieval evaluation techniques
How eBay measures search relevance
Information retrieval performance evaluation tool @ Athena Research Centre | Wikipedia/Information_retrieval_applications |
An information system (IS) is a formal, sociotechnical, organizational system designed to collect, process, store, and distribute information. From a sociotechnical perspective, information systems comprise four components: task, people, structure (or roles), and technology. Information systems can be defined as an integration of components for collection, storage and processing of data, comprising digital products that process data to facilitate decision making and the data being used to provide information and contribute to knowledge.
A computer information system is a system, which consists of people and computers that process or interpret information. The term is also sometimes used to simply refer to a computer system with software installed.
"Information systems" is also an academic field of study about systems with a specific reference to information and the complementary networks of computer hardware and software that people and organizations use to collect, filter, process, create and also distribute data. An emphasis is placed on an information system having a definitive boundary, users, processors, storage, inputs, outputs and the aforementioned communication networks.
In many organizations, the department or unit responsible for information systems and data processing is known as "information services".
Any specific information system aims to support operations, management and decision-making. An information system is the information and communication technology (ICT) that an organization uses, and also the way in which people interact with this technology in support of business processes.
Some authors make a clear distinction between information systems, computer systems, and business processes. Information systems typically include an ICT component but are not purely concerned with ICT, focusing instead on the end-use of information technology. Information systems are also different from business processes. Information systems help to control the performance of business processes.
Alter argues that viewing an information system as a special type of work system has its advantages. A work system is a system in which humans or machines perform processes and activities using resources to produce specific products or services for customers. An information system is a work system in which activities are devoted to capturing, transmitting, storing, retrieving, manipulating and displaying information.
As such, information systems inter-relate with data systems on the one hand and activity systems on the other. An information system is a form of communication system in which data represent and are processed as a form of social memory. An information system can also be considered a semi-formal language which supports human decision making and action.
Information systems are the primary focus of study for organizational informatics.
== Overview ==
Silver et al. (1995) provided two views on IS that includes software, hardware, data, people, and procedures.
The Association for Computing Machinery defines "Information systems specialists [as] focus[ing] on integrating information technology solutions and business processes to meet the information needs of businesses and other enterprises."
There are various types of information systems, : including transaction processing systems, decision support systems, knowledge management systems, learning management systems, database management systems, and office information systems. Critical to most information systems are information technologies, which are typically designed to enable humans to perform tasks for which the human brain is not well suited, such as: handling large amounts of information, performing complex calculations, and controlling many simultaneous processes.
Information technologies are a very important and malleable resource available to executives. Many companies have created a position of chief information officer (CIO) that sits on the executive board with the chief executive officer (CEO), chief financial officer (CFO), chief operating officer (COO), and chief technical officer (CTO). The CTO may also serve as CIO, and vice versa. The chief information security officer (CISO) focuses on information security management.
=== Six components ===
The six components that must come together in order to produce an information system are:
Hardware: The term hardware refers to machinery and equipment. In a modern information system, this category includes the computer itself and all of its support equipment. The support equipment includes input and output devices, storage devices and communications devices. In pre-computer information systems, the hardware might include ledger books and ink.
Software: The term software refers to computer programs and the manuals (if any) that support them. Computer programs are machine-readable instructions that direct the circuitry within the hardware parts of the system to function in ways that produce useful information from data. Programs are generally stored on some input/output medium, often a disk or tape. The "software" for pre-computer information systems included how the hardware was prepared for use (e.g., column headings in the ledger book) and instructions for using them (the guidebook for a card catalog).
Data: Data are facts that are used by systems to produce useful information. In modern information systems, data are generally stored in machine-readable form on disk or tape until the computer needs them. In pre-computer information systems, the data were generally stored in human-readable form.
Procedures: Procedures are the policies that govern the operation of an information system. "Procedures are to people what software is to hardware" is a common analogy that is used to illustrate the role of procedures in a system.
People: Every system needs people if it is to be useful. Often the most overlooked element of the system is the people, probably the component that most influences the success or failure of information systems. This includes "not only the users, but those who operate and service the computers, those who maintain the data, and those who support the network of computers".
Internet: The internet is a combination of data and people. (Although this component is not necessary for functionality.)
Data is the bridge between hardware and people. This means that the data we collect is only data until we involve people. At that point, data becomes information.
== Types ==
The "classic" view of Information systems found in textbooks in the 1980s was a pyramid of systems that reflected the hierarchy of the organization, usually transaction processing systems at the bottom of the pyramid, followed by management information systems, decision support systems, and ending with executive information systems at the top. Although the pyramid model remains useful since it was first formulated, a number of new technologies have been developed and new categories of information systems have emerged, some of which no longer fit easily into the original pyramid model.
Some examples of such systems are:
A computer(-based) information system is essentially an IS using computer technology to carry out some or all of its planned tasks. The basic components of computer-based information systems are:
Hardware are the devices like the monitor, processor, printer, and keyboard, all of which work together to accept, process, show data, and information.
Software are the programs that allow the hardware to process the data.
Databases are the gathering of associated files or tables containing related data.
Networks are a connecting system that allows diverse computers to distribute resources.
Procedures are the commands for combining the components above to process information and produce the preferred output.
The first four components (hardware, software, database, and network) make up what is known as the information technology platform.
Information technology workers could then use these components to create information systems that watch over safety measures, risk and the management of data. These actions are known as information technology services.
Certain information systems support parts of organizations, others support entire organizations, and still others, support groups of organizations. Each department or functional area within an organization has its own collection of application programs or information systems. These functional area information systems (FAIS) are supporting pillars for more general IS namely, business intelligence systems and dashboards. As the name suggests, each FAIS supports a particular function within the organization, e.g.: accounting IS, finance IS, production-operation management (POM) IS, marketing IS, and human resources IS. In finance and accounting, managers use IT systems to forecast revenues and business activity, to determine the best sources and uses of funds, and to perform audits to ensure that the organization is fundamentally sound and that all financial reports and documents are accurate.
Other types of organizational information systems are FAIS, transaction processing systems, enterprise resource planning, office automation system, management information system, decision support system, expert system, executive dashboard, supply chain management system, and electronic commerce system. Dashboards are a special form of IS that support all managers of the organization. They provide rapid access to timely information and direct access to structured information in the form of reports. Expert systems attempt to duplicate the work of human experts by applying reasoning capabilities, knowledge, and expertise within a specific domain.
== Development ==
Information technology departments in larger organizations tend to strongly influence the development, use, and application of information technology in the business.
A series of methodologies and processes can be used to develop and use an information system. Many developers use a systems engineering approach such as the system development life cycle (SDLC), to systematically develop an information system in stages. The stages of the system development lifecycle are planning, system analysis, and requirements, system design, development, integration and testing, implementation and operations, and maintenance.
Recent research aims at enabling and measuring the ongoing, collective development of such systems within an organization by the entirety of human actors themselves.
An information system can be developed in house (within the organization) or outsourced. This can be accomplished by outsourcing certain components or the entire system. A specific case is the geographical distribution of the development team (offshoring, global information system).
A computer-based information system, following a definition of Langefors, is a technologically implemented medium for recording, storing, and disseminating linguistic expressions, as well as for drawing conclusions from such expressions.
Geographic information systems, land information systems, and disaster information systems are examples of emerging information systems, but they can be broadly considered as spatial information systems.
System development is done in stages which include:
Problem recognition and specification
Information gathering
Requirements specification for the new system
System design
System construction
System implementation
Review and maintenance
== As an academic discipline ==
The field of study called information systems encompasses a variety of topics including systems analysis and design, computer networking, information security, database management, and decision support systems. Information management deals with the practical and theoretical problems of collecting and analyzing information in a business function area including business productivity tools, applications programming and implementation, electronic commerce, digital media production, data mining, and decision support. Communications and networking deals with telecommunication technologies.
Information systems bridges business and computer science using the theoretical foundations of information and computation to study various business models and related algorithmic processes on building the IT systems within a computer science discipline. Computer information systems (CIS) is a field studying computers and algorithmic processes, including their principles, their software and hardware designs, their applications, and their impact on society, whereas IS emphasizes functionality over design.
Several IS scholars have debated the nature and foundations of information systems which have its roots in other reference disciplines such as computer science, engineering, mathematics, management science, cybernetics, and others. Information systems also can be defined as a collection of hardware, software, data, people, and procedures that work together to produce quality information.
=== Related terms ===
Similar to computer science, other disciplines can be seen as both related and foundation disciplines of IS. The domain of study of IS involves the study of theories and practices related to the social and technological phenomena, which determine the development, use, and effects of information systems in organizations and society. But, while there may be considerable overlap of the disciplines at the boundaries, the disciplines are still differentiated by the focus, purpose, and orientation of their activities.
In a broad scope, information systems is a scientific field of study that addresses the range of strategic, managerial, and operational activities involved in the gathering, processing, storing, distributing, and use of information and its associated technologies in society and organizations. The term information systems is also used to describe an organizational function that applies IS knowledge in the industry, government agencies, and not-for-profit organizations.
Information systems often refers to the interaction between algorithmic processes and technology. This interaction can occur within or across organizational boundaries. An information system is a technology an organization uses and also the way in which the organizations interact with the technology and the way in which the technology works with the organization's business processes. Information systems are distinct from information technology (IT) in that an information system has an information technology component that interacts with the processes' components.
One problem with that approach is that it prevents the IS field from being interested in non-organizational use of ICT, such as in social networking, computer gaming, mobile personal usage, etc. A different way of differentiating the IS field from its neighbours is to ask, "Which aspects of reality are most meaningful in the IS field and other fields?" This approach, based on philosophy, helps to define not just the focus, purpose, and orientation, but also the dignity, destiny and, responsibility of the field among other fields.
Business informatics is a related discipline that is well-established in several countries, especially in Europe. While Information systems has been said to have an "explanation-oriented" focus, business informatics has a more "solution-oriented" focus and includes information technology elements and construction and implementation-oriented elements.
== Career pathways ==
Information systems workers enter a number of different careers:
Information system strategy
Management information systems – A management information system (MIS) is an information system used for decision-making, and for the coordination, control, analysis, and visualization of information in an organization.
Project management – Project management is the practice of initiating, planning, executing, controlling, and closing the work of a team to achieve specific goals and meet specific success criteria at the specified time.
Enterprise architecture – A well-defined practice for conducting enterprise analysis, design, planning, and implementation, using a comprehensive approach at all times, for the successful development and execution of strategy.
IS development
IS organization
IS consulting
IS security
IS auditing
There is a wide variety of career paths in the information systems discipline. "Workers with specialized technical knowledge and strong communications skills will have the best prospects. Workers with management skills and an understanding of business practices and principles will have excellent opportunities, as companies are increasingly looking to technology to drive their revenue."
Information technology is important to the operation of contemporary businesses, it offers many employment opportunities. The information systems field includes the people in organizations who design and build information systems, the people who use those systems, and the people responsible for managing those systems.
The demand for traditional IT staff such as programmers, business analysts, systems analysts, and designer is significant. Many well-paid jobs exist in areas of Information technology. At the top of the list is the chief information officer (CIO).
The CIO is the executive who is in charge of the IS function. In most organizations, the CIO works with the chief executive officer (CEO), the chief financial officer (CFO), and other senior executives. Therefore, he or she actively participates in the organization's strategic planning process.
=== Bachelor of Business Information Systems ===
== Research ==
Information systems research is generally interdisciplinary concerned with the study of the effects of information systems on the behaviour of individuals, groups, and organizations. Hevner et al. (2004) categorized research in IS into two scientific paradigms including behavioural science which is to develop and verify theories that explain or predict human or organizational behavior and design science which extends the boundaries of human and organizational capabilities by creating new and innovative artifacts.
Salvatore March and Gerald Smith proposed a framework for researching different aspects of information technology including outputs of the research (research outputs) and activities to carry out this research (research activities). They identified research outputs as follows:
Constructs which are concepts that form the vocabulary of a domain. They constitute a conceptualization used to describe problems within the domain and to specify their solutions.
A model which is a set of propositions or statements expressing relationships among constructs.
A method which is a set of steps (an algorithm or guideline) used to perform a task. Methods are based on a set of underlying constructs and a representation (model) of the solution space.
An instantiation is the realization of an artefact in its environment.
Also research activities including:
Build an artefact to perform a specific task.
Evaluate the artefact to determine if any progress has been achieved.
Given an artefact whose performance has been evaluated, it is important to determine why and how the artefact worked or did not work within its environment. Therefore, theorize and justify theories about IT artefacts.
Although Information Systems as a discipline has been evolving for over 30 years now, the core focus or identity of IS research is still subject to debate among scholars. There are two main views around this debate: a narrow view focusing on the IT artifact as the core subject matter of IS research, and a broad view that focuses on the interplay between social and technical aspects of IT that is embedded into a dynamic evolving context. A third view calls on IS scholars to pay balanced attention to both the IT artifact and its context.
Since the study of information systems is an applied field, industry practitioners expect information systems research to generate findings that are immediately applicable in practice. This is not always the case however, as information systems researchers often explore behavioral issues in much more depth than practitioners would expect them to do. This may render information systems research results difficult to understand, and has led to criticism.
In the last ten years, the business trend is represented by the considerable increase of Information Systems Function (ISF) role, especially with regard to the enterprise strategies and operations supporting. It became a key factor to increase productivity and to support value creation. To study an information system itself, rather than its effects, information systems models are used, such as EATPUT.
The international body of Information Systems researchers, the Association for Information Systems (AIS), and its Senior Scholars Forum Subcommittee on Journals (202), proposed a list of 11 journals that the AIS deems as 'excellent'. According to the AIS, this list of journals recognizes topical, methodological, and geographical diversity. The review processes are stringent, editorial board members are widely-respected and recognized, and there is international readership and contribution. The list is (or should be) used, along with others, as a point of reference for promotion and tenure and, more generally, to evaluate scholarly excellence.
A number of annual information systems conferences are run in various parts of the world, the majority of which are peer reviewed. The AIS directly runs the International Conference on Information Systems (ICIS) and the Americas Conference on Information Systems (AMCIS), while AIS affiliated conferences include the Pacific Asia Conference on Information Systems (PACIS), European Conference on Information Systems (ECIS), the Mediterranean Conference on Information Systems (MCIS), the International Conference on Information Resources Management (Conf-IRM) and the Wuhan International Conference on E-Business (WHICEB). AIS chapter conferences include Australasian Conference on Information Systems (ACIS), Scandinavian Conference on Information Systems (SCIS), Information Systems International Conference (ISICO), Conference of the Italian Chapter of AIS (itAIS), Annual Mid-Western AIS Conference (MWAIS) and Annual Conference of the Southern AIS (SAIS). EDSIG, which is the special interest group on education of the AITP, organizes the Conference on Information Systems and Computing Education and the Conference on Information Systems Applied Research which are both held annually in November.
== See also ==
== References ==
== Further reading ==
Rainer, R. Kelly and Cegielski, Casey G. (2009). "Introduction to Information Systems: Enabling and Transforming Business, 3rd Edition" Archived 2010-06-28 at the Wayback Machine
Kroenke, David (2008). Using MIS – 2nd Edition.
Lindsay, John (2000). Information Systems – Fundamentals and Issues. Kingston University, School of Information Systems
Dostal, J. School information systems (Skolni informacni systemy). In Infotech 2007 – modern information and communication technology in education. Olomouc, EU: Votobia, 2007. s. 540 – 546. ISBN 978-80-7220-301-7.
O'Leary, Timothy and Linda. (2008). Computing Essentials Introductory 2008. McGraw-Hill on Computing2008.com
Sage, S.M. "Information Systems: A brief look into history", Datamation, 63–69, Nov. 1968. – Overview of the early history of IS.
== External links ==
Association for Information Systems (AIS)
IS History website by AIS
Center for Information Systems Research – Massachusetts Institute of Technology
European Research Center for Information Systems | Wikipedia/Information_systems |
Computer and information science (CIS; also known as information and computer science) is a field that emphasizes both computing and informatics, upholding the strong association between the fields of information sciences and computer sciences and treating computers as a tool rather than a field.
Information science is one with a long history, unlike the relatively very young field of computer science, and is primarily concerned with gathering, storing, disseminating, sharing and protecting any and all forms of information. It is a broad field, covering a myriad of different areas but is often referenced alongside computer science because of the incredibly useful nature of computers and computer programs in helping those studying and doing research in the field – particularly in helping to analyse data and in spotting patterns too broad for a human to intuitively perceive. While information science is sometimes confused with information theory, the two have vastly different subject matter. Information theory focuses on one particular mathematical concept of information while information science is focused on all aspects of the processes and techniques of information.
Computer science, in contrast, is less focused on information and its different states, but more, in a very broad sense, on the use of computers – both in theory and practice – to design and implement algorithms in order to aid the processing of information during the different states described above. It has strong foundations in the field of mathematics, as the very first recognised practitioners of the field were renowned mathematicians such as Alan Turing.
Information science and computing began to converge in the 1950s and 1960s, as information scientists started to realize the many ways computers would improve information storage and retrieval.
== Terminology ==
Due to the distinction between computers and computing, some of the research groups refer to computing or datalogy. The French refer to computer science as the term informatique. The term information and communications technology (ICT), refers to how humans communicate with using machines and computers, making a distinction from information and computer science, which is how computers use and gain information.
Informatics is also distinct from computer science, which encompasses the study of logic and low-level computing issues.
== Education ==
Universities may confer degrees with a major in computer and information science, not to be confused with a more specific Bachelor of Computer Science or respective graduate computer science degrees.
The QS World University Rankings is one of the most widely recognised and distinguished university comparisons. They ranked the top 10 universities for computer science and information systems in 2015.
They are:
Massachusetts Institute of Technology (MIT)
Stanford University
University of Oxford
Carnegie Mellon University
Harvard University
University of California, Berkeley (UCB)
University of Cambridge
The Hong Kong University of Science and Technology
Swiss Federal Institute of Technology (ETH Zurich)
Princeton University
A Computer Information Science degree gives students both network and computing knowledge which is needed to design, develop, and assist information systems which helps to solve business problems and to support business problems and to support business operations and decision making at a managerial level also.
== Areas of information and computer science ==
Due to the nature of this field, many topics are also shared with computer science and information systems.
The discipline of Information and Computer Science spans a vast range of areas from basic computer science theory (algorithms and computational logic) to in depth analysis of data manipulation and use within technology.
=== Programming theory ===
The process of taking a given algorithm and encoding it into a language that can be understood and executed by a computer. There are many different types of programming languages and various different types of computers, however, they all have the same goal: to turn algorithms into machine code.
Popular programming languages used within the academic study of CIS include, but are not limited to: Java, Python, C#, C++, Perl, Ruby, Pascal, Swift, Visual Basic.
=== Information and information systems ===
The academic study of software and hardware systems that process large quantities and data, support large scale data management and how data can be used. This is where the field is unique from the standard study of computer science. The area of information systems focuses on the networks of hardware and software that are required to process, manipulate and distribute such data.
=== Computer systems and organisations ===
The process of analysing computer architecture and various logic circuits. This involves looking at low level computer processes at bit level computation. This is an in-depth look into the hardware processing of a computational system, involving looking at the basic structure of a computer and designing such systems. This can also involve evaluating complex circuit diagrams, and being able to construct these to solve a main problem.
The main purpose behind this area of study is to achieve an understanding of how computers function on a basic level, often through tracing machine operations.
=== Machines, languages, and computation ===
This is the study into fundamental computer algorithms, which are the basis to computer programs. Without algorithms, no computer programs would exist. This also involves the process of looking into various mathematical functions behind computational algorithms, basic theory and functional (low level) programming.
In an academic setting, this area would introduce the fundamental mathematical theorems and functions behind theoretical computer science which are the building blocks for other areas in the field. Complex topics such as; proofs, algebraic functions and sets will be introduced during studies of CIS.
== Developments ==
Information and computer science is a field that is rapidly developing with job prospects for students being extremely promising with 75.7% of graduates gaining employment. Also the IT industry employs one in twenty of the workforce with it predicted to increase nearly five times faster than the average of the UK and between 2012 and 2017 more than half a million people will be needed within the industry and the fact that nine out of ten tech firms are suffering from candidate shortages which is having a negative impact on their business as it delays the creation and development of new products, and it's predicted in the US that in the next decade there will be more than one million jobs in the technology sector than computer science graduates to fill them. Because of this programming is now being taught at an earlier age with an aim to interest students from a young age into computer and information science hopefully leading more children to study this at a higher level. For example, children in England will now be exposed to computer programming at the age of 5 due to an updated national curriculum.
== Employment ==
Due to the wide variety of jobs that now involve computer and information science related tasks, it is difficult to provide a comprehensive list of possible jobs in this area, but some of the key areas are artificial intelligence, software engineering and computer networking and communication. Work in this area also tends to require sufficient understanding of mathematics and science. Moreover, jobs that having a CIS degree can lead to, include: systems analyst, network administrator, system architect, information systems developer, web programmer, or software developer.
The earning potential for CIS graduates is quite promising. A 2013 survey from the National Association of Colleges and Employers (NACE) found that the average starting salary for graduates who earned a degree in a computer related field was $59,977, up 4.3% from the prior year. This is higher than other popular degrees such as business ($54,234), education ($40,480) and math and sciences ($42,724). Furthermore, Payscale ranked 129 college degrees based on their graduates earning potential with engineering, math, science, and technology fields dominating the ranking. With eight computer related degrees appearing among the top 30. With the lowest starting salary for these jobs being $49,900. A Rasmussen College article describes various jobs CIS graduates may obtain with software applications developers at the top making a median income of $98,260.
According to the National Careers Service an Information Scientist can expect to earn £24,000+ per year as a starting salary.
== References == | Wikipedia/Computer_and_information_science |
Library and information science (LIS) are two interconnected disciplines that deal with information management. This includes organization, access, collection, and regulation of information, both in physical and digital forms.
Library science and information science are two original disciplines; however, they are within the same field of study. Library science is applied information science. Library science is both an application and a subfield of information science. Due to the strong connection, sometimes the two terms are used synonymously.
== Definition ==
Library science (previously termed library studies and library economy) is an interdisciplinary or multidisciplinary field that applies the practices, perspectives, and tools of management, information technology, education, and other areas to libraries; the collection, organization, preservation, and dissemination of information resources; and the political economy of information. Martin Schrettinger, a Bavarian librarian, coined the discipline within his work (1808–1828) Versuch eines vollständigen Lehrbuchs der Bibliothek-Wissenschaft oder Anleitung zur vollkommenen Geschäftsführung eines Bibliothekars. Rather than classifying information based on nature-oriented elements, as was previously done in his Bavarian library, Schrettinger organized books in alphabetical order. The first American school for library science was founded by Melvil Dewey at Columbia University in 1887.
Historically, library science has also included archival science. This includes: how information resources are organized to serve the needs of selected user groups; how people interact with classification systems and technology; how information is acquired, evaluated and applied by people in and outside libraries as well as cross-culturally; how people are trained and educated for careers in libraries; the ethics that guide library service and organization; the legal status of libraries and information resources; and the applied science of computer technology used in documentation and records management.
LIS should not be confused with information theory, the mathematical study of the concept of information. Library philosophy has been contrasted with library science as the study of the aims and justifications of librarianship as opposed to the development and refinement of techniques.
== Education and training ==
Academic courses in library science include collection management, information systems and technology, research methods, user studies, information literacy, cataloging and classification, preservation, reference, statistics and management. Library science is constantly evolving, incorporating new topics like database management, information architecture and information management, among others.
With the mounting acceptance of Wikipedia as a valued and reliable reference source, many libraries, museums, and archives have introduced the role of Wikipedian in residence. As a result, some universities are including coursework relating to Wikipedia and Knowledge Management in their MLIS programs.
Becoming a library staff member does not always need a degree, and in some contexts the difference between being a library staff member and a librarian is the level of education. Most professional library jobs require a professional degree in library science or equivalent. In the United States and Canada the certification usually comes from a master's degree granted by an ALA-accredited institution. In Australia, a number of institutions offer degrees accepted by the ALIA (Australian Library and Information Association). Global standards of accreditation or certification in librarianship have yet to be developed.
=== United States and Canada ===
The Master of Library and Information Science (MLIS) is the master's degree that is required for most professional librarian positions in the United States and Canada. The MLIS was created after the older Master of Library Science (MLS) was reformed to reflect the information science and technology needs of the field. According to the American Library Association (ALA), "ALA-accredited degrees have [had] various names such as Master of Arts, Master of Librarianship, Master of Library and Information Studies, or Master of Science. The degree name is determined by the program. The [ALA] Committee for Accreditation evaluates programs based on their adherence to the Standards for Accreditation of Master's Programs in Library and Information Studies, not based on the name of the degree."
== Types of librarianship ==
=== Public ===
The study of librarianship for public libraries covers issues such as cataloging; collection development for a diverse community; information literacy; readers' advisory; community standards; public services-focused librarianship via community-centered programming; serving a diverse community of adults, children, and teens; intellectual freedom; censorship; and legal and budgeting issues. The public library as a commons or public sphere based on the work of Jürgen Habermas has become a central metaphor in the 21st century.
In the United States there are four different types of public libraries: association libraries, municipal public libraries, school district libraries, and special district public libraries. Each receives funding through different sources, each is established by a different set of voters, and not all are subject to municipal civil service governance.
=== School ===
The study of school librarianship covers library services for children in Nursery, primary through secondary school. In some regions, the local government may have stricter standards for the education and certification of school librarians (who are sometimes considered a special case of teacher), than for other librarians, and the educational program will include those local criteria. School librarianship may also include issues of intellectual freedom, pedagogy, information literacy, and how to build a cooperative curriculum with the teaching staff.
=== Academic ===
The study of academic librarianship covers library services for colleges and universities. Issues of special importance to the field may include copyright; technology; digital libraries and digital repositories; academic freedom; open access to scholarly works; and specialized knowledge of subject areas important to the institution and the relevant reference works. Librarians often divide focus individually as liaisons on particular schools within a college or university. Academic librarians may be subject specific librarians.
Some academic librarians are considered faculty, and hold similar academic ranks to those of professors, while others are not. In either case, the minimal qualification is a Master of Arts in Library Studies or a Master of Arts in Library Science. Some academic libraries may only require a master's degree in a specific academic field or a related field, such as educational technology.
=== Archival ===
The study of archives includes the training of archivists, librarians specially trained to maintain and build archives of records intended for historical preservation. Special issues include physical preservation, conservation, and restoration of materials and mass deacidification; specialist catalogs; solo work; access; and appraisal. Many archivists are also trained historians specializing in the period covered by the archive. There have been attempts to revive the concept of documentation and to speak of Library, information and documentation studies (or science).
The archival mission includes three major goals: To identify papers and records with enduring value, preserve the identified papers, and make the papers available to others. While libraries receive items individually, archival items will usually become part of the archive's collection as a cohesive group. Major difference in collections is that library collections typically comprise published items (books, magazines, etc.), while archival collections are usually unpublished works (letters, diaries, etc.). Library collections are created by many individuals, as each author and illustrator create their own publication; in contrast, an archive usually collects the records of one person, family, institution, or organization, so the archival items will have fewer sources of authors.
Behavior in an archive differs from behavior in other libraries. In most libraries, items are openly available to the public. Archival items almost never circulate, and someone interested in viewing documents must request them of the archivist and may only be able view them in a closed reading room.
=== Special ===
Special libraries are libraries established to meet the highly specialized requirements of professional or business groups. A library is special depending on whether it covers a specialized collection, a special subject, or a particular group of users, or even the type of parent organization, such as medical libraries or law libraries.
The issues at these libraries are specific to their industries but may include solo work, corporate financing, specialized collection development, and extensive self-promotion to potential patrons. Special librarians have their own professional organization, the Special Libraries Association (SLA).
Some special libraries, such as the CIA Library, may contain classified works. It is a resource to employees of the Central Intelligence Agency, containing over 125,000 written materials, subscribes to around 1,700 periodicals, and had collections in three areas: Historical Intelligence, Circulating, and Reference. In February 1997, three librarians working at the institution spoke to Information Outlook, a publication of the SLA, revealing that the library had been created in 1947, the importance of the library in disseminating information to employees, even with a small staff, and how the library organizes its materials.
=== Preservation ===
Preservation librarians most often work in academic libraries. Their focus is on the management of preservation activities that seek to maintain access to content within books, manuscripts, archival materials, and other library resources. Examples of activities managed by preservation librarians include binding, conservation, digital and analog reformatting, digital preservation, and environmental monitoring.
== History ==
Libraries have existed for many centuries but library science is a more recent phenomenon, as early libraries were managed primarily by academics.
=== 17th and 18th century ===
The earliest text on "library operations", Advice on Establishing a Library was published in 1627 by French librarian and scholar Gabriel Naudé. Naudé wrote on many subjects including politics, religion, history, and the supernatural. He put into practice all the ideas put forth in Advice when given the opportunity to build and maintain the library of Cardinal Jules Mazarin.
During the 'golden age of libraries' in the 17th century, publishers and sellers seeking to take advantage of the burgeoning book trade developed descriptive catalogs of their wares for distribution – a practice was adopted and further extrapolated by many libraries of the time to cover areas like philosophy, sciences, linguistics, and medicine
In 1726 Gottfried Wilhelm Leibniz wrote Idea of Arranging a Narrower Library.
=== 19th century ===
Martin Schrettinger wrote the second textbook (the first in Germany) on the subject from 1808 to 1829.
Some of the main tools used by LIS to provide access to the resources originated in 19th century to make information accessible by recording, identifying, and providing bibliographic control of printed knowledge. The origin for some of these tools were even earlier.
Thomas Jefferson, whose library at Monticello consisted of thousands of books, devised a classification system inspired by the Baconian method, which grouped books more or less by subject rather than alphabetically, as it was previously done. The Jefferson collection provided the start of what became the Library of Congress.
The first American school of librarianship opened in New York under the leadership of Melvil Dewey, noted for his 1876 decimal classification, on January 5, 1887, as the Columbia College School of Library Economy. The term library economy was common in the U.S. until 1942, with the term, library science, predominant through much of the 20th century.
=== 20th century ===
In the English-speaking world the term "library science" seems to have been used for the first time in India in the 1916 book Punjab Library Primer, written by Asa Don Dickinson and published by the University of Punjab, Lahore, Pakistan. This university was the first in Asia to begin teaching "library science". The Punjab Library Primer was the first textbook on library science published in English anywhere in the world. The first textbook in the United States was the Manual of Library Economy by James Duff Brown, published in 1903.
Later, the term was used in the title of S. R. Ranganathan's The Five Laws of Library Science, published in 1931, which contains Ranganathan's titular theory. Ranganathan is also credited with the development of the first major analytical-synthetic classification system, the colon classification.
In the United States, Lee Pierce Butler published his 1933 book An Introduction to Library Science (University of Chicago Press), where he advocated for research using quantitative methods and ideas in the social sciences with the aim of using librarianship to address society's information needs. He was one of the first faculty at the University of Chicago Graduate Library School, which changed the structure and focus of education for librarianship in the twentieth century. This research agenda went against the more procedure-based approach of the "library economy", which was mostly confined to practical problems in the administration of libraries.
In 1923, Charles C. Williamson, who was appointed by the Carnegie Corporation, published an assessment of library science education entitled "The Williamson Report", which designated that universities should provide library science training. This report had a significant impact on library science training and education. Library research and practical work, in the area of information science, have remained largely distinct both in training and in research interests.
William Stetson Merrill's A Code for Classifiers, released in several editions from 1914 to 1939, is an example of a more pragmatic approach, where arguments stemming from in-depth knowledge about each field of study are employed to recommend a system of classification. While Ranganathan's approach was philosophical, it was also tied more to the day-to-day business of running a library. A reworking of Ranganathan's laws was published in 1995 which removes the constant references to books. Michael Gorman's Our Enduring Values: Librarianship in the 21st Century features the eight principles necessary by library professionals and incorporates knowledge and information in all their forms, allowing for digital information to be considered.
==== From library science to LIS ====
By the late 1960s, mainly due to the meteoric rise of human computing power and the new academic disciplines formed therefrom, academic institutions began to add the term "information science" to their names. The first school to do this was at the University of Pittsburgh in 1964. More schools followed during the 1970s and 1980s. By the 1990s almost all library schools in the US had added information science to their names. Although there are exceptions, similar developments have taken place in other parts of the world. In India, the Department of Library Science, University of Madras (southern state of TamiilNadu, India) became the Department of Library and Information Science in 1976. In Denmark, for example, the "Royal School of Librarianship" changed its English name to The Royal School of Library and Information Science in 1997.
=== 21st century ===
The digital age has transformed how information is accessed and retrieved. "The library is now a part of a complex and dynamic educational, recreational, and informational infrastructure." Mobile devices and applications with wireless networking, high-speed computers and networks, and the computing cloud have deeply impacted and developed information science and information services. The evolution of the library sciences maintains its mission of access equity and community space, as well as the new means for information retrieval called information literacy skills. All catalogs, databases, and a growing number of books are available on the Internet. In addition, the expanding free access to open access journals and sources such as Wikipedia has fundamentally impacted how information is accessed.
Information literacy is the ability to "determine the extent of information needed, access the needed information effectively and efficiently, evaluate information and its sources critically, incorporate selected information into one's knowledge base, use information effectively to accomplish a specific purpose, and understand the economic, legal, and social issues surrounding the use of information, and access and use information ethically and legally." In recent years, the concept of data literacy has emerged within library and information science as a complement to information literacy to refer to the ability to find, interpret, evaluate, manage, and ethically use data to support research, learning, and informed decision-making.
In the early 2000s, dLIST, Digital Library for Information Sciences and Technology was established. It was the first open access archive for the multidisciplinary 'library and information sciences' building a global scholarly communication consortium and the LIS Commons in order to increase the visibility of research literature, bridge the divide between practice, teaching, and research communities, and improve visibility, uncitedness, and integrate scholarly work in the critical information infrastructures of archives, libraries, and museums.
Social justice, an important ethical value in librarianship and in the 21st century has become an important research area, if not subdiscipline of LIS.
== Journals ==
Some core journals in LIS are:
Annual Review of Information Science and Technology (ARIST) (1966–2011)
El Profesional de la Información (EPI) (1992–) (Formerly Information World en Español)
Information Processing and Management
Information Research: An International Electronic Journal (IR) (1995–)
Italian Journal of Library and Information Studies (JLIS.it)
Journal of Documentation (JDoc) (1945–)
Journal of Information Science (JIS) (1979–)
Journal of the Association for Information Science and Technology (formerly Journal of the American Society for Information Science and Technology) (JASIST) (1950–)
Knowledge Organization
Library Literature and Information Science Retrospective
Library Trends (1952–)
Scientometrics (journal) (1978–)
The Library Quarterly (LQ) (1931–)
Grandhalaya Sarvaswam (1915–)
Important bibliographical databases in LIS are, among others, Social Sciences Citation Index and Library and Information Science Abstracts
== Conferences ==
This is a list of some of the major conferences in the field.
Annual meetings of the American Library Association.
Annual meeting of the American Society for Information Science and Technology
Annual meeting of the Association for Library and Information Science Education
Conceptions of Library and Information Science
i-Schools' iConferences
The International Federation of Library Associations and Institutions (IFLA): World Library and Information Congress
African Library and Information Associations and Institutions (AfLIA) Conference
== Subfields ==
Information science grew out of documentation science and therefore has a tradition for considering scientific and scholarly communication, bibliographic databases, subject knowledge and terminology etc.
An advertisement for a full Professor in information science at the Royal School of Library and Information Science, spring 2011, provides one view of which sub-disciplines are well-established: "The research and teaching/supervision must be within some (and at least one) of these well-established information science areas
A curriculum study by Kajberg & Lørring in 2005 reported a "degree of overlap of the ten curricular themes with subject areas in the current curricula of responding LIS schools".
Information seeking and Information retrieval 100%
Library management and promotion 96%
Knowledge management 86%
Knowledge organization 82%
Information literacy and learning 76%
Library and society in a historical perspective (Library history) 66%
The Information society: Barriers to the free access to information 64%
Cultural heritage and digitisation of the cultural heritage (Digital preservation) 62%
The library in the multi-cultural information society: International and intercultural communication 42%
Mediation of culture in a special European context 26% "
There is often an overlap between these subfields of LIS and other fields of study. Most information retrieval research, for example, belongs to computer science. Knowledge management is considered a subfield of management or organizational studies.
=== Metadata ===
Pre-Internet classification systems and cataloging systems were mainly concerned with two objectives:
To provide rich bibliographic descriptions and relations between information objects, and
To facilitate sharing of this bibliographic information across library boundaries.
The development of the Internet and the information explosion that followed found many communities needing mechanisms for the description, authentication and management of their information. These communities developed taxonomies and controlled vocabularies to describe their knowledge, as well as unique information architectures to communicate these classifications and libraries found themselves as liaison or translator between these metadata systems. The concerns of cataloging in the Internet era have gone beyond simple bibliographic descriptions and the need for descriptive information about the ownership and copyright of a digital product – a publishing concern – and description for the different formats and accessibility features of a resource – a sociological concern – show the continued development and cross discipline necessity of resource description.
In the 21st century, the usage of open data, open source and open protocols like OAI-PMH has allowed thousands of libraries and institutions to collaborate on the production of global metadata services previously offered only by increasingly expensive commercial proprietary products. Tools like BASE and Unpaywall automate the search of an academic paper across thousands of repositories by libraries and research institutions.
=== Knowledge organization ===
Library science is very closely related to issues of knowledge organization; however, the latter is a broader term that covers how knowledge is represented and stored (computer science/linguistics), how it might be automatically processed (artificial intelligence), and how it is organized outside the library in global systems such as the internet. In addition, library science typically refers to a specific community engaged in managing holdings as they are found in university and government libraries, while knowledge organization, in general, refers to this and also to other communities (such as publishers) and other systems (such as the Internet). The library system is thus one socio-technical structure for knowledge organization.
The terms 'information organization' and 'knowledge organization' are often used synonymously.: 106 The fundamentals of their study - particularly theory relating to indexing and classification - and many of the main tools used by the disciplines in modern times to provide access to digital resources such as abstracting, metadata, resource description, systematic and alphabetic subject description, and terminology, originated in the 19th century and were developed, in part, to assist in making humanity's intellectual output accessible by recording, identifying, and providing bibliographic control of printed knowledge.: 105
Information has been published that analyses the relations between the philosophy of information (PI), library and information science (LIS), and social epistemology (SE).
=== Ethics ===
Practicing library professionals and members of the American Library Association recognize and abide by the ALA Code of Ethics. According to the American Library Association, "In a political system grounded in an informed citizenry, we are members of a profession explicitly committed to intellectual freedom and freedom of access to information. We have a special obligation to ensure the free flow of information and ideas to present and future generations." The ALA Code of Ethics was adopted in the winter of 1939, and updated on June 29, 2021.
== See also ==
== Notes ==
== References ==
== Further reading ==
Åström, Fredrik (September 5, 2008). "Formalizing a discipline: The institutionalization of library and information science research in the Nordic countries". Journal of Documentation. 64 (5): 721–737. doi:10.1108/00220410810899736.
Bawden, David; Robinson, Lyn (August 20, 2012). Introduction to Information Science. American Library Association. ISBN 978-1555708610.
Hjørland, Birger (2000). "Library and information science: practice, theory, and philosophical basis". Information Processing & Management. 36 (3): 501–531. doi:10.1016/S0306-4573(99)00038-2.
Järvelin, Kalervo; Vakkari, Pertti (January 1993). "The evolution of library and information science 1965–1985: A content analysis of journal articles". Information Processing & Management. 29 (1): 129–144. doi:10.1016/0306-4573(93)90028-C.
McNicol, Sarah (March 2003). "LIS: the interdisciplinary research landscape". Journal of Librarianship and Information Science. 35 (1): 23–30. doi:10.1177/096100060303500103. S2CID 220912521.
Dick, Archie L. (1995). "Library and Information Science as a Social Science: Neutral and Normative Conceptions". The Library Quarterly: Information, Community, Policy. 65 (2): 216–235. doi:10.1086/602777. JSTOR 4309022. S2CID 142825177.
Foundational Books in Library Services.1976-2024. LHRT News & Notes. October, 2024.
International Journal of Library Science (ISSN 0975-7546)
Lafontaine, Gerard S. (1958). Dictionary of Terms Used in the Paper, Printing, and Allied Industries. Toronto: H. Smith Paper Mills. 110 p.
The Oxford Guide to Library Research (2005) – ISBN 0195189981
Taşkın, Zehra (2021). "Forecasting the future of library and information science and its sub-fields". Scientometrics. 126 (2): 1527–1551. doi:10.1007/s11192-020-03800-2. PMC 7745590. PMID 33353991.
Thompson, Elizabeth H. (1943). A.L.A. Glossary of Library Terms, with a Selection of Terms in Related Fields, prepared under the direction of the Committee on Library Terminology of the American Library Association. Chicago, Ill.: American Library Association. viii, 189 p. ISBN 978-0838900000
V-LIB 1.2 (2008 Vartavan Library Classification, over 700 fields of sciences & arts classified according to a relational philosophy, currently sold under license in the UK by Rosecastle Ltd. (see Vartavan-Frame)
== External links ==
Media related to Library and information science at Wikimedia Commons
LISNews.org – librarian and information science news
LISWire.com – librarian and information science wire | Wikipedia/Library_science |
Documentation science is the study of the recording and retrieval of information. It includes methods for storing, retrieving, and sharing of information captured on physical as well as digital documents. This field is closely linked to the fields of library science and information science but has its own theories and practices.
The term documentation science was coined by Belgian lawyer and peace activist Paul Otlet. He is considered to be the forefather of information science. He along with Henri La Fontaine laid the foundations of documentation science as a field of study. Professionals in this field are called documentalists.
Over the years, documentation science has grown to become a large and important field of study. Evolving from traditional practices like archiving and retrieval to modern theories about the nature of documents, novel methods for organizing digital information, and applications in libraries, research, healthcare, business, and technology and more. This field continues to evolve in the digital age.
== Developments in Documentation Science ==
1895: The International Institute of Bibliography (originally Institut International de Bibliographie, IIB) was established on 12 September 1895, in Brussels, Belgium by Paul Otlet and Henri La Fontaine. It aimed to catalog all recorded knowledge using a universal classification system now known as the Universal Decimal Classification (UDC).
1931: International Institute of Bibliography (originally Institut International de Bibliographie, IIB) was renamed The International Institute for Documentation, (Institut International de Documentation, IID).
1934: Paul Otlet envisioned a “radiated library,” a global network of interconnected documents accessible from anywhere via telecommunication. This early idea is now seen as a forerunner of the internet.
1937: American Documentation Institute was founded (1968 nameshift to American Society for Information Science).
1951: Suzanne Briet published Qu'est-ce que la documentation? where she proposed that “a document is evidence in support of a fact,” expanding the definition to include objects such as animals in zoos when they are part of a scientific study. This was a significant theoretical shift in defining documents.
1965-1990: Documentation departments were established, for example, large research libraries, online computer retrieval systems and more. The persons doing the searches were called documentalists. But with the appearance of first CD-ROM databases in the mid 1980s and later the internet in 1990s, these intermediary searches decreased and most such departments closed or merged with other departments.
1996: "Dokvit", Documentation Studies, was established in 1996 at the University of Tromsø in Norway.
2001: The Document Academy was established. It is an international network that celebrates documentation. It was conducted by The Program of Documentation Studies, University of Tromsø, Norway and The School of Information Management and Systems, UC Berkeley.
2003: The first Document Research Conference (DOCAM), a series of conferences made by the Document Academy. DOCAM '03 (2003) was held 13–15 August 2003 at The School of Information Management and Systems (SIMS) at the University of California, Berkeley.
2007: Michael Buckland, Ronald Day, and Birger Hjørland expanded the theoretical foundations of documentation science. They researched and explored documents to be social artifacts, the role of ideology in classification, and how documents influenced knowledge systems.
2010s: The concept of post-documentation or “documentality” began in the 2010s, which focused on how digital traces (e.g., tweets, logs) function as documents without traditional physical form. This led to new thinking in document theory.
2016–present: The Document Academy’s DOCAM conferences have continued, offering ongoing developments in the theory and practice of documentation. Themes include affect, memory, activism, and born-digital records.
2017: The journal Information Research published special issues addressing “document theory,” including views on documentation in virtual environments and digital archives.
2020–present: The growth of research data management (RDM) and open science has made documentation practices central to data sharing, metadata standards, and reproducibility in scientific work.
== Theoretical Foundations ==
Documentation science has some deep theories that explain what a document is, how people use documents, and how they are organized. These concepts were introduced by scholars who have not only studied libraries, but also philosophy, language, and social sciences.
Suzanne Briet described a document as “any material form of evidence” that is made to be used as proof or to share information. An antelope in a zoo, for example, can be a document because it's being studied, classified, and described.
Documents are not just things or materials but are also shaped by society. Michael Buckland noted that documents have meaning only when people agree they are useful or valid as information. He explained a document becomes a document when someone decides to use it as evidence.
Ronald Day wrote about how documentation is not neutral, it can be influenced by power, ideology, and politics. He claimed that classification systems, like how libraries organize books, are not just technical tools. They also show what kinds of knowledge are seen as more important than others.
In recent years, new theories have been introduced, like “documentality” by Maurizio Ferraris. He proposed that a document doesn’t have to be a paper or file, it can also be something digital like a tweet, a database entry, or a log file, as long as it leaves a trace that can be looked at later. This theory helps explain modern digital documents.
== Methodologies and Practice ==
Documentation science includes many methods that help people collect, organize, store, and find information. These practices are used in libraries, archives, research labs, companies, and now also in online systems.
=== Collecting and Creating Documents ===
In the past, documentation work included gathering books, articles, reports, and other printed materials. People created records of these materials manually, using catalog cards, indexes, or bibliographies. Paul Otlet’s work with the Universal Bibliographic Repertory is one example. He created millions of card entries to organize knowledge from around the world.
Today, documents are not only created by humans. Computers and machines also generate documents, like log files, metadata, and sensor data. These need new tools and methods for collection and management.
=== Organizing Information ===
Organizing documents has always been a foundational element of documentation science. Methods like classification (dividing things into groups) and indexing (making lists of topics or keywords) help individuals find what they need.
A widely used system is the Universal Decimal Classification (UDC) developed by Otlet and La Fontaine. Another is the Library of Congress Classification (LCC) used in the majority of U.S. libraries. Indexing can be performed by humans or by software programs that read the text and add tags to documents.
Metadata is also used to describe documents. Metadata is “data about data” like the title, author, date, and subject of a document. Standards like Dublin Core are used in digital libraries to keep metadata consistent.
=== Retrieval and Access ===
One of the main objectives of documentation is helping users find the right document. This is called information retrieval. In the past, this meant using catalog drawers or printed indexes. Today, people use search engines, databases, and digital libraries.
Modern retrieval tools use Boolean logic, ranking algorithms, and sometimes machine learning to show the most useful results first. This is part of what’s studied in both documentation science and information retrieval.
=== Preservation and Archiving ===
Documents require long term storage. This is called preservation of documents. Printed documents can be damaged by light, pests, or even time on the other hand digital documents can be deemed worthless if formats become outdated or storage facilities fail.
Archivists use methods like migration, which includes moving files to new formats, and emulation, which replicates obsolete systems, to preserve materials.
These methods and tools are ever changing as new technologies develop. But the main objective of documentation has remained the same, which is to keep information safe, organized, and easy to find.
== Documentation in the digital age ==
With the expansion of the internet, computers, and cloud storage, documents are no longer just books, papers, or reports. They can now be emails, tweets, videos, websites, databases, or even log files created by machines.
=== Born-digital documents ===
Many documents today are created directly in digital form. These are called born-digital documents. Examples include digital photographs, social media posts, emails, and online articles. They are typically stored in the cloud or on servers.
Scholars like Maurizio Ferraris and Ronald Day state that these digital traces are still documents, because they can be stored, retrieved, and used later. They call this idea documentality, meaning anything that leaves a trace can be a document.
=== Digital preservation ===
Digital documents can disappear easily if not stored adequately. That’s why digital preservation is now a big part of documentation science.
To keep documents usable, archivists employ techniques like emulation, which recreates outdated systems and migration which involves transferring files to new formats. To ensure that digital files remain authentic and undamaged.
=== Metadata and interoperability ===
Digital documents also long good metadata i.e. information that describes the document, like title, author, date, and subject. Standards like Dublin Core and MODS help keep metadata consistent across systems so documents can be retrieved and used by people and machines.
Interoperability allows separate systems to work together; for instance, a digital library in one nation can share records with another library in another country. Documentation science works on making metadata and document formats easier to share across platforms.
=== New challenges ===
In the digital age, information is being generated at an exponential rate far beyond previously imagined. This is sometimes called information overload. Thus, arise questions about privacy, authenticity, and ethics in digital documentation. For example, who owns a digital document? Can it be trusted? How long should it be kept? These are ongoing challenges we face in the field today.
== Modern Applications ==
Today, documentation science is employed in nearly all fields. It's use extends from archives and libraries, to science, business, health care, education, and technology. Its overarching goal still remains the same: to create, organize, and share documents so that it is convenient for people to find and utilize information.
Libraries and archives
Documentation methods such as cataloging, classification, and metadata tagging are still used in libraries. Most libraries have also developed online digital repositories where library users can access historical documents, reports, theses, and e-books.
Archives use documentation science to preserve records over long periods. This includes not only paper records but also born-digital materials like emails, websites, and databases.
=== Research and education ===
In universities and research centers, documentation science helps with research data management (RDM) to make sure data from experiments is organized, labeled, and stored properly for others to reuse. This supports open science and helps researchers meet funding and publishing requirements.
Instructors also teach documentation skills like quoting sources, evaluating information, and using digital tools to write, arrange, and share scholarly work.
=== Health and business ===
In healthcare, documentation is used in electronic health records (EHRs). These records consist of patient prescriptions, test results, treatment plans, and histories. Accurate documentation of these records can help doctors and nurses make the right decisions at the right time to improve patient safety and health.
Businesses use documentation systems to store project files, MoMs, compliance documents, and standard operating procedures (SOPs). These documents aid employee collaboration, knowledge sharing, and acting in accordance with organization protocols.
=== Technology and digital platforms ===
Modern software tools like content management systems (CMS), document version control systems, and collaborative platforms are based on documentation science principles.
In programming and IT, developers create technical documentation for APIs, systems, and code. This assists others in understanding the technology and its use.
Documentation science today is increasingly becoming vital. It helps manage the huge amount of digital information created every day and supports knowledge sharing in almost every aspect of work and life.
== See also ==
== References ==
== Further reading ==
Berard, R. (2003). Documentation. IN: International Encyclopedia of Information and Library Science. 2nd. ed. Ed. by John Feather & Paul Sturges. London: Routledge (pp. 147–149).
Bradford, S. C. (1948). Documentation. London: Crosby Lockwood.
Bradford, S. C. (1953). Documentation. 2nd ed. London: Crosby Lockwood.
Briet, Suzanne (1951). Qu'est-ce que la documentation? Paris: Editions Documentaires Industrielle et Techniques.
Briet, Suzanne, 2006. What is Documentation? English Translation of the Classic French Text. Transl. and ed. by Ronald E. Day and Laurent Martinet. Lanham, MD: Scarecrow Press.
Buckland, Michael, 1996. Documentation, Information Science, and Library Science in the U.S.A. Information Processing & Management 32, 63-76. Reprinted in Historical Studies in Information Science, eds. Trudi B. Hahn, and Michael Buckland. Medford, NJ: Information Today, 159- 172.
Buckland, Michael (2007). Northern Light: Fresh Insights into Enduring Concerns. In: Document (re)turn. Contributions from a research field in transition. Ed. By Roswitha Skare, Niels Windfeld Lund & Andreas Vårheim. Frankfurt am Main: Peter Lang. (pp. 315–322). Retrieved 2011-10-16 from: http://people.ischool.berkeley.edu/~buckland/tromso07.pdf
Farkas-Conn, I. S. (1990). From Documentation to Information Science. The Beginnings and Early Development of the American Documentation Institute - American Society for information Science. Westport, CT: Greenwood Press.
Frohmann, Bernd, 2004. Deflating Information: From Science Studies to Documentation. Toronto; Buffalo; London: University of Toronto Press.
Garfield, E. (1953). Librarian versus documentalist. Manuscript submitted to Special Libraries. http://www.garfield.library.upenn.edu/papers/librarianvsdocumentalisty1953.html
Graziano, E. E. (1968). On a theory of documentation. American Documentalist 19, 85-89.
Hjørland, Birger (2000). Documents, memory institutions and information science. JOURNAL OF DOCUMENTATION, 56(1), 27-41. Retrieved 2013-02-17 from: https://web.archive.org/web/20160303222759/http://iva.dk/bh/Core%20Concepts%20in%20LIS/articles%20a-z/Documents_memory%20institutions%20and%20IS.pdf
Konrad, A. (2007). On inquiry: Human concept formation and construction of meaning through library and information science intermediation (Unpublished doctoral dissertation). University of California, Berkeley. Retrieved from http://escholarship.org/uc/item/1s76b6hp
Lund, Niels Windfeld, 2004. Documentation in a Complementary Perspective. In Aware and responsible: Papers of the Nordic-International Colloquium on Social and Cultural Awareness and Responsibility in Library, Information and Documentation Studies (SCARLID), ed. Rayward, Lanham, Md.: Scarecrow Press, 93-102.
Lund, Niels Windfeld (2007). Building a Discipline, Creating a Profession: An Essay on the Childhood of "Dokvit". IN: Document (re)turn. Contributions from a research field in transition. Ed. By Roswitha Skare, Niels Windfeld Lund & Andreas Vårheim. Frankfurt am Main: Peter Lang. (pp. 11–26). Retrieved 2011-10-16 from: http://www.ub.uit.no/munin/bitstream/handle/10037/966/paper.pdf?sequence=1
Lund, Niels Windfeld (2009). Document Theory. ANNUAL REVIEW OF INFORMATION SCIENCE AND TECHNOLOGY, 43, 399-432.
W. Boyd Rayward; Hansson,Joacim & Suominen, Vesa (eds). (2004). Aware and Responsible: Papers of the Nordic-International Colloquium on Social and Cultural Awareness and Responsibility in Library, Information and Documentation Studies. Lanham, MD: Scarecrow Press. (pp. 71–91). https://web.archive.org/web/20070609223747/http://www.db.dk/binaries/social%20and%20cultural%20awareness.pdf
Simon, E. N. (1947). A novice on "documentation". Journal of Documentation, 3(2), 238-341.
Williams, R. V. (1998). The Documentation and Special Libraries Movement in the United States, 1910-1960. IN: Hahn, T. B. & Buckland, M. (eds.): Historical Studies in Information Science. Medford, NJ: Information Today, Inc. (pp. 173–180).
Woledge, G. (1983). Bibliography and Documentation - Words and Ideas. Journal of Documentation, 39(4), 266-279.
Ørom, Anders (2007). The concept of information versus the concept of document. IN: Document (re)turn. Contributions from a research field in transition. Ed. By Roswitha Skare, Niels Windfeld Lund & Andreas Vårheim. Frankfurt am Main: Peter Lang. (pp. 53–72). | Wikipedia/Documentation_science |
In software engineering, coupling is the degree of interdependence between software modules, a measure of how closely connected two routines or modules are, and the strength of the relationships between modules. Coupling is not binary but multi-dimensional.
Coupling is usually contrasted with cohesion. Low coupling often correlates with high cohesion, and vice versa. Low coupling is often thought to be a sign of a well-structured computer system and a good design, and when combined with high cohesion, supports the general goals of high readability and maintainability.
== History ==
The software quality metrics of coupling and cohesion were invented by Larry Constantine in the late 1960s as part of a structured design, based on characteristics of “good” programming practices that reduced maintenance and modification costs. Structured design, including cohesion and coupling, were published in the article Stevens, Myers & Constantine (1974) and the book Yourdon & Constantine (1979), and the latter subsequently became standard terms.
== Types of coupling ==
Coupling can be "low" (also "loose" and "weak") or "high" (also "tight" and "strong"). Some types of coupling, in order of highest to lowest coupling, are as follows:
=== Procedural programming ===
A module here refers to a subroutine of any kind, i.e. a set of one or more statements having a name and preferably its own set of variable names.
Content coupling (high)
Content coupling is said to occur when one module uses the code of another module, for instance a branch. This violates information hiding – a basic software design concept.
Common coupling
Common coupling is said to occur when several modules have access to the same global data. But it can lead to uncontrolled error propagation and unforeseen side-effects when changes are made.
External coupling
External coupling occurs when two modules share an externally imposed data format, communication protocol, or device interface. This is basically related to the communication to external tools and devices.
Control coupling
Control coupling is one module controlling the flow of another, by passing it information on what to do (e.g., passing a what-to-do flag).
Stamp coupling (data-structured coupling)
Stamp coupling occurs when modules share a composite data structure and use only parts of it, possibly different parts (e.g., passing a whole record to a function that needs only one field of it).
In this situation, a modification in a field that a module does not need may lead to changing the way the module reads the record. To illustrate the concept of stamp coupling, consider a scenario involving a UserProfile component. This component is designed to return the entire user profile information in response to requests, even when consumers only require a specific attribute. This practice exemplifies stamp coupling, which can lead to significant bandwidth issues, especially at scale. When any attribute within the UserProfile component changes, all consumers that interact with it may need to undergo testing, even if they do not utilize the modified attribute.
Data coupling
Data coupling occurs when modules share data through, for example, parameters. Each datum is an elementary piece, and these are the only data shared (e.g., passing an integer to a function that computes a square root).
=== Object-oriented programming ===
Subclass coupling
Describes the relationship between a child and its parent. The child is connected to its parent, but the parent is not connected to the child.
Temporal coupling
It is when two actions are bundled together into one module just because they happen to occur at the same time.
In recent work various other coupling concepts have been investigated and used as indicators for different modularization principles used in practice.
==== Dynamic coupling ====
The goal of defining and measuring this type of coupling is to provide a run-time evaluation of a software system. It has been argued that static coupling metrics lose precision when dealing with an intensive use of dynamic binding or inheritance. In the attempt to solve this issue, dynamic coupling measures have been taken into account.
==== Semantic coupling ====
This kind of a coupling metric considers the conceptual similarities between software entities using, for example, comments and identifiers and relying on techniques such as latent semantic indexing (LSI).
==== Logical coupling ====
Logical coupling (or evolutionary coupling or change coupling) analysis exploits the release history of a software system to find change patterns among modules or classes: e.g., entities that are likely to be changed together or sequences of changes (a change in a class A is always followed by a change in a class B).
== Dimensions of coupling ==
According to Gregor Hohpe, coupling is multi-dimensional:
Technology Dependency
Location Dependency
Topology Dependency
Data Format & Type Dependency
Semantic Dependency
Conversation Dependency
Order Dependency
Temporal Dependency
== Disadvantages of tight coupling ==
Tightly coupled systems tend to exhibit the following developmental characteristics, which are often seen as disadvantages:
A change in one module usually forces a ripple effect of changes in other modules.
Assembly of modules might require more effort and/or time due to the increased inter-module dependency.
A particular module might be harder to reuse and/or test because dependent modules must be included.
== Performance issues ==
Whether loosely or tightly coupled, a system's performance is often reduced by message and parameter creation, transmission, translation (e.g. marshaling) and message interpretation (which might be a reference to a string, array or data structure), which require less overhead than creating a complicated message such as a SOAP message. Longer messages require more CPU and memory to produce. To optimize runtime performance, message length must be minimized and message meaning must be maximized.
Message Transmission Overhead and Performance
Since a message must be transmitted in full to retain its complete meaning, message transmission must be optimized. Longer messages require more CPU and memory to transmit and receive. Also, when necessary, receivers must reassemble a message into its original state to completely receive it. Hence, to optimize runtime performance, message length must be minimized and message meaning must be maximized.
Message Translation Overhead and Performance
Message protocols and messages themselves often contain extra information (i.e., packet, structure, definition and language information). Hence, the receiver often needs to translate a message into a more refined form by removing extra characters and structure information and/or by converting values from one type to another. Any sort of translation increases CPU and/or memory overhead. To optimize runtime performance, message form and content must be reduced and refined to maximize its meaning and reduce translation.
Message Interpretation Overhead and Performance
All messages must be interpreted by the receiver. Simple messages such as integers might not require additional processing to be interpreted. However, complex messages such as SOAP messages require a parser and a string transformer for them to exhibit intended meanings. To optimize runtime performance, messages must be refined and reduced to minimize interpretation overhead.
== Solutions ==
One approach to decreasing coupling is functional design, which seeks to limit the responsibilities of modules along functionality. Coupling increases between two classes A and B if:
A has an attribute that refers to (is of type) B.
A calls on services of an object B.
A has a method that references B (via return type or parameter).
A is a subclass of (or implements) class B.
Low coupling refers to a relationship in which one module interacts with another module through a simple and stable interface and does not need to be concerned with the other module's internal implementation (see Information Hiding).
Systems such as CORBA or COM allow objects to communicate with each other without having to know anything about the other object's implementation. Both of these systems even allow for objects to communicate with objects written in other languages.
== Coupling vs Connascence ==
Coupling describes the degree and nature of dependency between software components, focusing on what they share (e.g., data, control flow, technology) and how tightly they are bound. It evaluates two key dimensions: strength, which measures how difficult it is to change the dependency, and scope (or visibility), which indicates how widely the dependency is exposed across modules or boundaries. Traditional coupling types typically include content coupling, common coupling, control coupling, stamp coupling, external coupling, and data coupling.
Connascence, introduced by Meilir Page-Jones, provides a systematic framework for analyzing and measuring coupling dependencies. It evaluates dependencies based on three dimensions: strength, which measures the effort required to refactor or modify the dependency; locality, which considers how physically or logically close dependent components are in the codebase; and degree, which measures how many components are affected by the dependency. Connascence can be categorized into static (detectable at compile-time) and dynamic (detectable at runtime) forms. Static connascence refers to compile-time dependencies, such as method signatures, while dynamic connascence refers to runtime dependencies, which can manifest in forms like connascence of timing, values, or algorithm.
Each coupling flavor can exhibit multiple types of connascence, a specific type, or, in rare cases, none at all, depending on how the dependency is implemented. Common types of connascence include connascence of name, type, position, and meaning. Certain coupling types naturally align with specific connascence types; for example, data coupling often involves connascence of name or type. However, not every combination of coupling and connascence is practically meaningful. Dependencies relying on parameter order in a method signature demonstrate connascence of position, which is fragile and difficult to refactor because reordering parameters breaks the interface. In contrast, connascence of name, which relies on field or parameter names, is generally more resilient to change. Connascence types themselves exhibit a natural hierarchy of strength, with connascence of name typically considered weaker than connascence of meaning.
Dependencies spanning module boundaries or distributed systems typically have higher coordination costs, increasing the difficulty of refactoring and propagating changes across distant boundaries. Modern practices, such as dependency injection and interface-based programming, are often employed to reduce coupling strength and improve the maintainability of dependencies.
While coupling identifies what is shared between components, connascence evaluates how those dependencies behave, how changes propagate, and how difficult they are to refactor. Strength, locality, and degree are interrelated; dependencies with high strength, wide scope, and spanning distant boundaries are significantly harder to refactor and maintain. Together, coupling provides a high-level overview of dependency relationships, while connascence offers a granular framework for analyzing dependency strength, locality, degree, and resilience to change, supporting the design of maintainable and robust systems.
== Coupling versus cohesion ==
Coupling and cohesion are terms which occur together very frequently. Coupling refers to the interdependencies between modules, while cohesion describes how related the functions within a single module are. Low cohesion implies that a given module performs tasks which are not very related to each other and hence can create problems as the module becomes large.
== Module coupling ==
Coupling in Software Engineering describes a version of metrics associated with this concept.
For data and control flow coupling:
di: number of input data parameters
ci: number of input control parameters
do: number of output data parameters
co: number of output control parameters
For global coupling:
gd: number of global variables used as data
gc: number of global variables used as control
For environmental coupling:
w: number of modules called (fan-out)
r: number of modules calling the module under consideration (fan-in)
C
o
u
p
l
i
n
g
(
C
)
=
1
−
1
d
i
+
2
×
c
i
+
d
o
+
2
×
c
o
+
g
d
+
2
×
g
c
+
w
+
r
{\displaystyle \mathrm {Coupling} (C)=1-{\frac {1}{d_{i}+2\times c_{i}+d_{o}+2\times c_{o}+g_{d}+2\times g_{c}+w+r}}}
Coupling(C) makes the value larger the more coupled the module is. This number ranges from approximately 0.67 (low coupling) to 1.0 (highly coupled)
For example, if a module has only a single input and output data parameter
C
=
1
−
1
1
+
0
+
1
+
0
+
0
+
0
+
1
+
0
=
1
−
1
3
=
0.67
{\displaystyle C=1-{\frac {1}{1+0+1+0+0+0+1+0}}=1-{\frac {1}{3}}=0.67}
If a module has 5 input and output data parameters, an equal number of control parameters, and accesses 10 items of global data, with a fan-in of 3 and a fan-out of 4,
C
=
1
−
1
5
+
2
×
5
+
5
+
2
×
5
+
10
+
0
+
3
+
4
=
0.98
{\displaystyle C=1-{\frac {1}{5+2\times 5+5+2\times 5+10+0+3+4}}=0.98}
== See also ==
Connascence (computer science)
Coupling (physics)
Dead code elimination
Dependency hell
Efferent coupling
Inversion of control
List of object-oriented programming terms
Loose coupling
Make (software)
Static code analysis
== References ==
== Further reading ==
Myers, Glenford J. (1974). Reliable Software through Composite Design. New York: Mason and Lipscomb Publishers.
Offutt, A. Jefferson; Harrold, Mary Jean; Kolte, Priyadarshan (March 1993). "A Software Metric System for Module Coupling". Journal of Systems and Software. 20 (3): 295–308. doi:10.1016/0164-1212(93)90072-6.
Page-Jones, Meilir (1980). The Practical Guide to Structured Systems Design. New York: Yourdon Press. ISBN 978-8-12031482-5.
Standard Glossary of Software Engineering Terminology. New York: IEEE. 1990. ISBN 0-7381-0391-8. 610.12_1990.
"Curriculum for Certified Professional for Software Architecture (CPSA) - Foundation Level" (PDF). 3.01. International Software Architecture Qualification Board e.V. (ISAQB). 2015-05-15 [2009]. Archived from the original (PDF) on 2017-03-29. Retrieved 2019-06-23. [1] Archived 2016-02-22 at the Wayback Machine | Wikipedia/Coupling_(computer_science) |
In software engineering and systems engineering, a functional requirement defines a function of a system or its component, where a function is described as a summary (or specification or statement) of behavior between inputs and outputs.
Functional requirements may involve calculations, technical details, data manipulation and processing, and other specific functionality that define what a system is supposed to accomplish. Behavioral requirements describe all the cases where the system uses the functional requirements, these are captured in use cases. Functional requirements are supported by non-functional requirements (also known as "quality requirements"), which impose constraints on the design or implementation (such as performance requirements, security, or reliability). Generally, functional requirements are expressed in the form "system must do <requirement>," while non-functional requirements take the form "system shall be <requirement>." The plan for implementing functional requirements is detailed in the system design, whereas non-functional requirements are detailed in the system architecture.
As defined in requirements engineering, functional requirements specify particular results of a system. This should be contrasted with non-functional requirements, which specify overall characteristics such as cost and reliability. Functional requirements drive the application architecture of a system, while non-functional requirements drive the technical architecture of a system.
In some cases, a requirements analyst generates use cases after gathering and validating a set of functional requirements. The hierarchy of functional requirements collection and change, broadly speaking, is: user/stakeholder request → analyze → use case → incorporate. Stakeholders make a request; systems engineers attempt to discuss, observe, and understand the aspects of the requirement; use cases, entity relationship diagrams, and other models are built to validate the requirement; and, if documented and approved, the requirement is implemented/incorporated. Each use case illustrates behavioral scenarios through one or more functional requirements. Often, though, an analyst will begin by eliciting a set of use cases, from which the analyst can derive the functional requirements that must be implemented to allow a user to perform each use case.
== Process ==
A typical functional requirement will contain a unique name and number, a brief summary, and a rationale. This information is used to help the reader understand why the requirement is needed, and to track the requirement through the development of the system. The crux of the requirement is the description of the required behavior, which must be clear and readable. The described behavior may come from organizational or business rules, or it may be discovered through elicitation sessions with users, stakeholders, and other experts within the organization. Many requirements may be uncovered during the use case development. When this happens, the requirements analyst may create a placeholder requirement with a name and summary, and research the details later, to be filled in when they are better known.
== See also ==
Function (computer science)
Function (engineering)
Function (mathematics)
Function point
Functional decomposition
Functional design
Functional model
Separation of concerns
Software sizing
== References == | Wikipedia/Functional_requirements |
Named graphs are a key concept of Semantic Web architecture in which a set of Resource Description Framework statements (a graph) are identified using a URI, allowing descriptions to be made of that set of statements such as context, provenance information or other such metadata.
Named graphs are a simple extension of the RDF data model through which graphs can be created but the model lacks an effective means of distinguishing between them once published on the Web at large.
== Named graphs and HTTP ==
One conceptualization of the Web is as a graph of document nodes identified with URIs and connected by hyperlink arcs which are expressed within the HTML documents. By doing an HTTP GET on a URI (usually via a Web browser), a somehow-related document may be retrieved. This "follow your nose" approach also applies to RDF documents on the Web in the form of Linked Data, where typically an RDF syntax is used to express data as a series of statements, and URIs within the RDF point to other resources. This Web of data has been described by Tim Berners-Lee as the "Giant Global Graph".
Named graphs are a formalization of the intuitive idea that the contents of an RDF document (a graph) on the Web can be considered to be named by the URI of the document. This considerably simplifies techniques for managing chains of provenance for pieces of data and enabling fine-grained access control to the source data. Additionally, trust can be managed through the publisher applying a digital signature to the data in the named graph. (Support for these facilities was originally intended to come from RDF reification, however, that approach proved problematic.)
== Named graphs and RDF stores ==
While named graphs may appear on the Web as simple linked documents (i.e. Linked Data), they are also very useful for managing sets of RDF data within an RDF store. In particular, the scope of a SPARQL query may be limited to a specific set of named graphs.
=== Example ===
Assume the following (Turtle) RDF document has been placed in a SPARQL-capable store with the name http://example.org/joe.
This data has been written in a more verbose form than necessary to show the triple structures
The homepage of the person with the email address mailto:joe@example.org can be obtained using the SPARQL query:
The FROM NAMED here identifies the target graph for the query.
=== Named graphs and quads ===
Prior to the publication of the papers describing named graphs, there was considerable discussion about fulfilling their role within a store by using an arity greater than that of RDF triple statements: where triples have the form subject predicate object, quads would have a form along the lines of subject predicate object context. Named graphs can be represented this way, as subject predicate object graphname, with the advantage that the graphname part will be a URI, giving the quad Web-global scope compared to arbitrary local statement names. This way of representing quads resp. quad-statements was incorporated in the specification of N-Quads.
== Formal definition ==
A paper from the WWW 2005 conference by Carroll et al. includes a formal definition of named graphs.
== Specifications ==
There is currently no specification for named graphs in themselves beyond that described in Carroll et al. (2005) and Carroll and Stickler (2004) (which includes syntaxes for representing named graphs), but they do form part of the SPARQL Protocol and RDF Query Language specification.
== Proposed specifications ==
TriX - Named Graphs in XML
TriG - Named Graphs in Turtle
N-Quads - Named Graphs in N-Triples
== See also ==
Jeni Tennison (2011-07-05). "What Do URIs Mean Anyway?". Jeni's Musings. Jeni Tennison. Retrieved 6 July 2011.
== References == | Wikipedia/Named_graph |
In computing, the network model is a database model conceived as a flexible way of representing objects and their relationships. Its distinguishing feature is that the schema, viewed as a graph in which object types are nodes and relationship types are arcs, is not restricted to being a hierarchy or lattice.
The network model was adopted by the CODASYL Data Base Task Group in 1969 and underwent a major update in 1971. It is sometimes known as the CODASYL model for this reason. A number of network database systems became popular on mainframe and minicomputers through the 1970s before being widely replaced by relational databases in the 1980s.
== Overview ==
While the hierarchical database model structures data as a tree of records, with each record having one parent record and many children, the network model allows each record to have multiple parent and child records, forming a generalized graph structure. This property applies at two levels: the schema is a generalized graph of record types connected by relationship types (called "set types" in CODASYL), and the database itself is a generalized graph of record occurrences connected by relationships (CODASYL "sets"). Cycles are permitted at both levels. Peer-to-Peer and Client Server are examples of Network Models.
The chief argument in favour of the network model, in comparison to the hierarchical model, was that it allowed a more natural modeling of relationships between entities. Although the model was widely implemented and used, it failed to become dominant for two main reasons. Firstly, IBM chose to stick to the hierarchical model with semi-network extensions in their established products such as IMS and DL/I. Secondly, it was eventually displaced by the relational model, which offered a higher-level, more declarative interface. Until the early 1980s the performance benefits of the low-level navigational interfaces offered by hierarchical and network databases were persuasive for many large-scale applications, but as hardware became faster, the extra productivity and flexibility of the relational model led to the gradual obsolescence of the network model in corporate enterprise usage.
== History ==
The network model's original inventor was Charles Bachman, and it was developed into a standard specification published in 1969 by the Conference on Data Systems Languages (CODASYL) Consortium. This was followed by a second publication in 1971, which became the basis for most implementations. Subsequent work continued into the early 1980s, culminating in an ISO specification, but this had little influence on products.
Bachman's influence is recognized in the term Bachman diagram, a diagrammatic notation that represents a database schema expressed using the network model. In a Bachman diagram, named rectangles represent record types, and arrows represent one-to-many relationship types between records (CODASYL set types).
== Database systems ==
Some well-known database systems that use the network model include:
IMAGE for HP 3000
Integrated Data Store (IDS)
IDMS (Integrated Database Management System)
Univac DMS-1100
Norsk Data SIBAS
Oracle CODASYL DBMS for OpenVMS (originally known as DEC VAX DBMS)
== See also ==
Navigational database
Graph database
== References ==
David M, k., 1997. Fundamentals, Design, and Implementation. database processing ed. s.l.:Prentice-Hall.
== Further reading ==
Charles W. Bachman, The Programmer as Navigator. Turing Award lecture, Communications of the ACM, Volume 16, Issue 11, 1973, pp. 653–658, ISSN 0001-0782, doi:10.1145/355611.362534
== External links ==
"CODASYL Systems Committee "Survey of Data Base Systems"" (PDF). 1968-09-03. Archived from the original (PDF) on 2007-10-12.
Network (CODASYL) Data Model
SIBAS Database running on Norsk Data Servers | Wikipedia/Network_database |
A hierarchical database model is a data model in which the data is organized into a tree-like structure. The data are stored as records which is a collection of one or more fields. Each field contains a single value, and the collection of fields in a record defines its type. One type of field is the link, which connects a given record to associated records. Using links, records link to other records, and to other records, forming a tree. An example is a "customer" record that has links to that customer's "orders", which in turn link to "line_items".
The hierarchical database model mandates that each child record has only one parent, whereas each parent record can have zero or more child records. The network model extends the hierarchical by allowing multiple parents and children. In order to retrieve data from these databases, the whole tree needs to be traversed starting from the root node. Both models were well suited to data that was normally stored on tape drives, which had to move the tape from end to end in order to retrieve data.
When the relational database model emerged, one criticism of hierarchical database models was their close dependence on application-specific implementation. This limitation, along with the relational model's ease of use, contributed to the popularity of relational databases, despite their initially lower performance in comparison with the existing network and hierarchical models.
== History ==
The hierarchical structure was developed by IBM in the 1960s and used in early mainframe DBMS. Records' relationships form a treelike model. This structure is simple but inflexible because the relationship is confined to a one-to-many relationship. The IBM Information Management System (IMS) and RDM Mobile are examples of a hierarchical database system with multiple hierarchies over the same data.
The hierarchical data model lost traction as Codd's relational model became the de facto standard used by virtually all mainstream database management systems. A relational-database implementation of a hierarchical model was first discussed in published form in 1992 (see also nested set model). Hierarchical data organization schemes resurfaced with the advent of XML in the late 1990s (see also XML database). The hierarchical structure is used primarily today for storing geographic information and file systems.
Currently, hierarchical databases are still widely used especially in applications that require very high performance and availability such as banking, health care, and telecommunications. One of the most widely used commercial hierarchical databases is IMS.
Another example of the use of hierarchical databases is Windows Registry in the Microsoft Windows operating systems.
== Examples of hierarchical data represented as relational tables ==
An organization could store employee information in a table that contains attributes/columns such as employee number, first name, last name, and department number. The organization provides each employee with computer hardware as needed, but computer equipment may only be used by the employee to which it is assigned. The organization could store the computer hardware information in a separate table that includes each part's serial number, type, and the employee that uses it. The tables might look like this:
In this model, the employee data table represents the "parent" part of the hierarchy, while the computer table represents the "child" part of the hierarchy.
In contrast to tree structures usually found in computer software algorithms, in this model the children point to the parents.
As shown, each employee may possess several pieces of computer equipment, but each individual piece of computer equipment may have only one employee owner.
Consider the following structure:
In this, the "child" is the same type as the "parent". The hierarchy stating EmpNo 10 is boss of 20, and 30 and 40 each report to 20 is represented by the "ReportsTo" column. In Relational database terms, the ReportsTo column is a foreign key referencing the EmpNo column. If the "child" data type were different, it would be in a different table, but there would still be a foreign key referencing the EmpNo column of the employees table.
This simple model is commonly known as the adjacency list model and was introduced by Dr. Edgar F. Codd after initial criticisms surfaced that the relational model could not model hierarchical data. However, the model is only a special case of a general adjacency list for a graph.
== See also ==
Tree structure
Hierarchical query
Hierarchical clustering
== References ==
== External links ==
Troels' links to Hierarchical data in RDBMSs
Managing Hierarchical Data in MySQL (This page is from archive.org as the page has been removed from MySQL.com)
Hierarchical data in MySQL: parents and children in one query
Create Hierarchy Chart from Hierarchical Database | Wikipedia/Hierarchical_database_model |
Dimensional modeling (DM) is part of the Business Dimensional Lifecycle methodology developed by Ralph Kimball which includes a set of methods, techniques and concepts for use in data warehouse design.: 1258–1260 The approach focuses on identifying the key business processes within a business and modelling and implementing these first before adding additional business processes, as a bottom-up approach.: 1258–1260 An alternative approach from Inmon advocates a top down design of the model of all the enterprise data using tools such as entity-relationship modeling (ER).: 1258–1260
== Description ==
Dimensional modeling always uses the concepts of facts (measures), and dimensions (context). Facts are typically (but not always) numeric values that can be aggregated, and dimensions are groups of hierarchies and descriptors that define the facts. For example, sales amount is a fact; timestamp, product, register#, store#, etc. are elements of dimensions. Dimensional models are built by business process area, e.g. store sales, inventory, claims, etc. Because the different business process areas share some but not all dimensions, efficiency in design, operation, and consistency, is achieved using conformed dimensions, i.e. using one copy of the shared dimension across subject areas.
Dimensional modeling does not necessarily involve a relational database. The same modeling approach, at the logical level, can be used for any physical form, such as multidimensional database or even flat files. It is oriented around understandability and performance.
== Design method ==
=== Designing the model ===
The dimensional model is built on a star-like schema or snowflake schema, with dimensions surrounding the fact table. To build the schema, the following design model is used:
Choose the business process
Declare the grain
Identify the dimensions
Identify the fact
Choose the business process
The process of dimensional modeling builds on a 4-step design method that helps to ensure the usability of the dimensional model and the use of the data warehouse. The basics in the design build on the actual business process which the data warehouse should cover. Therefore, the first step in the model is to describe the business process which the model builds on. This could for instance be a sales situation in a retail store. To describe the business process, one can choose to do this in plain text or use basic Business Process Model and Notation (BPMN) or other design guides like the Unified Modeling Language |UML).
Declare the grain
After describing the business process, the next step in the design is to declare the grain of the model. The grain of the model is the exact description of what the dimensional model should be focusing on. This could for instance be “An individual line item on a customer slip from a retail store”. To clarify what the grain means, you should pick the central process and describe it with one sentence. Furthermore, the grain (sentence) is what you are going to build your dimensions and fact table from. You might find it necessary to go back to this step to alter the grain due to new information gained on what your model is supposed to be able to deliver.
Identify the dimensions
The third step in the design process is to define the dimensions of the model. The dimensions must be defined within the grain from the second step of the 4-step process. Dimensions are the foundation of the fact table, and is where the data for the fact table is collected. Typically dimensions are nouns like date, store, inventory etc. These dimensions are where all the data is stored. For example, the date dimension could contain data such as year, month and weekday.
Identify the facts
After defining the dimensions, the next step in the process is to make keys for the fact table. This step is to identify the numeric facts that will populate each fact table row. This step is closely related to the business users of the system, since this is where they get access to data stored in the data warehouse. Therefore, most of the fact table rows are numerical, additive figures such as quantity or cost per unit, etc.
=== Dimension normalization ===
Dimensional normalization or snowflaking removes redundant attributes, which are known in the normal flatten de-normalized dimensions. Dimensions are strictly joined together in sub dimensions.
Snowflaking has an influence on the data structure that differs from many philosophies of data warehouses.
Single data (fact) table surrounded by multiple descriptive (dimension) tables
Developers often don't normalize dimensions due to several reasons:
Normalization makes the data structure more complex
Performance can be slower, due to the many joins between tables
The space savings are minimal
Bitmap indexes can't be used
Query performance. 3NF databases suffer from performance problems when aggregating or retrieving many dimensional values that may require analysis. If you are only going to do operational reports then you may be able to get by with 3NF because your operational user will be looking for very fine grain data.
There are some arguments on why normalization can be useful. It can be an advantage when part of hierarchy is common to more than one dimension. For example, a geographic dimension may be reusable because both the customer and supplier dimensions use it.
== Benefits of dimensional modeling ==
Benefits of the dimensional model are the following:
Understandability. Compared to the normalized model, the dimensional model is easier to understand and more intuitive. In dimensional models, information is grouped into coherent business categories or dimensions, making it easier to read and interpret. Simplicity also allows software to navigate databases efficiently. In normalized models, data is divided into many discrete entities and even a simple business process might result in dozens of tables joined together in a complex way.
Query performance. Dimensional models are more denormalized and optimized for data querying, while normalized models seek to eliminate data redundancies and are optimized for transaction loading and updating. The predictable framework of a dimensional model allows the database to make strong assumptions about the data which may have a positive impact on performance. Each dimension is an equivalent entry point into the fact table, and this symmetrical structure allows effective handling of complex queries. Query optimization for star-joined databases is simple, predictable, and controllable.
Extensibility. Dimensional models are scalable and easily accommodate unexpected new data. Existing tables can be changed in place either by simply adding new data rows into the table or executing SQL alter table commands. No queries or applications that sit on top of the data warehouse need to be reprogrammed to accommodate changes. Old queries and applications continue to run without yielding different results. But in normalized models each modification should be considered carefully, because of the complex dependencies between database tables.
== Dimensional models, Hadoop, and big data ==
We still get the benefits of dimensional models on Hadoop and similar big data frameworks. However, some features of Hadoop require us to slightly adapt the standard approach to dimensional modelling.
The Hadoop File System is immutable. We can only add but not update data. As a result we can only append records to dimension tables. Slowly Changing Dimensions on Hadoop become the default behavior. In order to get the latest and most up to date record in a dimension table we have three options. First, we can create a View that retrieves the latest record using windowing functions. Second, we can have a compaction service running in the background that recreates the latest state. Third, we can store our dimension tables in mutable storage, e.g. HBase and federate queries across the two types of storage.
The way data is distributed across HDFS makes it expensive to join data. In a distributed relational database (MPP) we can co-locate records with the same primary and foreign keys on the same node in a cluster. This makes it relatively cheap to join very large tables. No data needs to travel across the network to perform the join. This is very different on Hadoop and HDFS. On HDFS tables are split into big chunks and distributed across the nodes on our cluster. We don’t have any control on how individual records and their keys are spread across the cluster. As a result joins on Hadoop for two very large tables are quite expensive as data has to travel across the network. We should avoid joins where possible. For a large fact and dimension table we can de-normalize the dimension table directly into the fact table. For two very large transaction tables we can nest the records of the child table inside the parent table and flatten out the data at run time.
== Literature ==
Kimball, Ralph; Margy Ross (2013). The Data Warehouse Toolkit: The Definitive Guide to Dimensional Modeling (3rd ed.). Wiley. ISBN 978-1-118-53080-1.
Ralph Kimball (1997). "A Dimensional Modeling Manifesto". DBMS and Internet Systems. 10 (9).
Margy Ross (Kimball Group) (2005). "Identifying Business Processes". Kimball Group, Design Tips (69). Archived from the original on 12 June 2013.
== References == | Wikipedia/Dimensional_modeling |
In software systems, encapsulation refers to the bundling of data with the mechanisms or methods that operate on the data. It may also refer to the limiting of direct access to some of that data, such as an object's components. Essentially, encapsulation prevents external code from being concerned with the internal workings of an object.
Encapsulation allows developers to present a consistent interface that is independent of its internal implementation. As one example, encapsulation can be used to hide the values or state of a structured data object inside a class. This prevents clients from directly accessing this information in a way that could expose hidden implementation details or violate state invariance maintained by the methods.
Encapsulation also encourages programmers to put all the code that is concerned with a certain set of data in the same class, which organizes it for easy comprehension by other programmers. Encapsulation is a technique that encourages decoupling.
All object-oriented programming (OOP) systems support encapsulation, but encapsulation is not unique to OOP. Implementations of abstract data types, modules, and libraries also offer encapsulation. The similarity has been explained by programming language theorists in terms of existential types.
== Meaning ==
In object-oriented programming languages, and other related fields, encapsulation refers to one of two related but distinct notions, and sometimes to the combination thereof:
A language mechanism for restricting direct access to some of the object's components.
A language construct that facilitates the bundling of data with the methods (or other functions) operating on those data.
Some programming language researchers and academics use the first meaning alone or in combination with the second as a distinguishing feature of object-oriented programming, while some programming languages that provide lexical closures view encapsulation as a feature of the language orthogonal to object orientation.
The second definition reflects that in many object-oriented languages, and other related fields, the components are not hidden automatically and this can be overridden. Thus, information hiding is defined as a separate notion by those who prefer the second definition.
The features of encapsulation are supported using classes in most object-oriented languages, although other alternatives also exist.
Encapsulation may also refer to containing a repetitive or complex process in a single unit to be invoked. Object-oriented programming facilitate this at both the method and class levels. This definition is also applicable to procedural programming.
=== Encapsulation and inheritance ===
The authors of Design Patterns discuss the tension between inheritance and encapsulation at length and state that in their experience, designers overuse inheritance. They claim that inheritance often breaks encapsulation, given that inheritance exposes a subclass to the details of its parent's implementation. As described by the yo-yo problem, overuse of inheritance and therefore encapsulation, can become too complicated and hard to debug.
== Information hiding ==
Under the definition that encapsulation "can be used to hide data members and member functions", the internal representation of an object is generally hidden outside of the object's definition. Typically, only the object's own methods can directly inspect or manipulate its fields. Hiding the internals of the object protects its integrity by preventing users from setting the internal data of the component into an invalid or inconsistent state. A supposed benefit of encapsulation is that it can reduce system complexity, and thus increase robustness, by allowing the developer to limit the interdependencies between software components.
Some languages like Smalltalk and Ruby only allow access via object methods, but most others (e.g., C++, C#, Delphi or Java) offer the programmer some control over what is hidden, typically via keywords like public and private. ISO C++ standard refers to protected, private and public as "access specifiers" and that they do not "hide any information". Information hiding is accomplished by furnishing a compiled version of the source code that is interfaced via a header file.
Almost always, there is a way to override such protection – usually via reflection API (Ruby, Java, C#, etc.), sometimes by mechanism like name mangling (Python), or special keyword usage like friend in C++. Systems that provide object-level capability-based security (adhering to the object-capability model) are an exception, and guarantee strong encapsulation.
=== Examples ===
==== Restricting data fields ====
Languages like C++, C#, Java, PHP, Swift, and Delphi offer ways to restrict access to data fields.
Below is an example in C# that shows how access to a data field can be restricted through the use of a private keyword:
Below is an example in Java:
Encapsulation is also possible in non-object-oriented languages. In C, for example, a structure can be declared in the public API via the header file for a set of functions that operate on an item of data containing data members that are not accessible to clients of the API with the extern keyword.
Clients call the API functions to allocate, operate on, and deallocate objects of an opaque data type. The contents of this type are known and accessible only to the implementation of the API functions; clients cannot directly access its contents. The source code for these functions defines the actual contents of the structure:
==== Name mangling ====
Below is an example of Python, which does not support variable access restrictions. However, the convention is that a variable whose name is prefixed by an underscore should be considered private.
== See also ==
Inheritance (object-oriented programming)
Object-oriented programming
Software design pattern
Facade pattern
== Citations ==
== References ==
Bloch, Joshua (2018). "Effective Java: Programming Language Guide" (third ed.). Addison-Wesley. ISBN 978-0134685991. | Wikipedia/Encapsulation_(computer_science) |
A MultiValue database is a type of NoSQL and multidimensional database. It is typically considered synonymous with PICK, a database originally developed as the Pick operating system.
MultiValue databases include commercial products from Rocket Software, Revelation, InterSystems, Northgate Information Solutions, ONgroup, and other companies. These databases differ from a relational database in that they have features that support and encourage the use of attributes which can take a list of values, rather than all attributes being single-valued. They are often categorized with MUMPS within the category of post-relational databases, although the data model actually pre-dates the relational model. Unlike SQL-DBMS tools, most MultiValue databases can be accessed both with or without SQL.
== History ==
Don Nelson designed the MultiValue data model in the early to mid-1960s. Dick Pick, a developer at TRW, worked on the first implementation of this model for the US Army in 1965. Pick considered the software to be in the public domain because it was written for the military, this was but the first dispute regarding MultiValue databases that was addressed by the courts.
Ken Simms wrote DataBASIC, sometimes known as S-BASIC, in the mid-1970s. It was based on Dartmouth BASIC, but had enhanced features for data management. Simms played a lot of Star Trek (a text-based early computer game originally written in Dartmouth BASIC) while developing the language, to ensure that DataBASIC functioned to his satisfaction.
Three of the implementations of MultiValue - PICK version R77, Microdata Reality 3.x, and Prime Information 1.0 - were very similar. In spite of attempts to standardize, particularly by International Spectrum and the Spectrum Manufacturers Association, who designed a logo for all to use, there are no standards across MultiValue implementations. Subsequently, these flavors diverged, although with some cross-over. These streams of MultiValue database development could be classified as one stemming from PICK R83, one from Microdata Reality, and one from Prime Information. Because of the differences, some implementations have provisions for supporting several flavors of the languages. An attempt to document the similarities and differences can be found at the Post-Relational Database Reference (PRDB).
One reasonable hypothesis for this data model lasting 50 years, with new database implementations of the model even in the 21st century is that it provides inexpensive database solutions.
== Data model example ==
In a MultiValue database system:
a database or schema is called an "account"
a table or collection is called a "file"
a column or field is called a field or an "attribute", which is composed of "multi-value attributes" and "sub-value attributes" to store multiple values in the same attribute.
a row or document is called a "record" or "item"
Data is stored using two separate files: a "file" to store raw data and a "dictionary" to store the format for displaying the raw data.
For example, assume there's a file (table) called "PERSON". In this file, there is an attribute called "eMailAddress". The eMailAddress field can store a variable number of email address values in a single record.
The list [joe@example.com, jdb@example.net, joe_bacde@example.org] can be stored and accessed via a single query when accessing the associated record.
Achieving the same (one-to-many) relationship within a traditional relational database system would include creating an additional table to store the variable number of email addresses associated with a single "PERSON" record. However, modern relational database systems support this multi-value data model too. For example, in PostgreSQL, a column can be an array of any base type.
== MultiValue Basic Language ==
Multivalue Basic (now commonly styled as mvBasic) is a family of programming languages more or less common (and portable) to all the multivalue databases derived from the original Pick Operating System. The variations between implementations are known as flavours.
The language originates from Dartmouth Basic and the earliest implementation of PickBASIC (now D3 FlashBasic). Over time various customisations and extensions have been added to take advantage of capabilities added to the different flavours while staying mainly in sync.
mvBasic statements and functions are designed to access and take advantage of the multivalue database model and providing the usual capabilities of most modern languages. For example, cryptography and communications. mvBasic is typeless and lends itself to structured programming techniques.
Example code is available but limited. Whilst there are commercial applications and tools available, the multivalue database community has not embraced the open source library/package model to the degree seen with other languages.
The typical mvBasic compiler compiles program source to a P-code executable object and runs in an interpreter, with D3 FlashBasic
and jBASE being notable exceptions.
== MultiValue Query Language ==
Known as ENGLISH, ACCESS, AQL, UniQuery, Retrieve, CMQL, and by many other names over the years, corresponding to the different MultiValue implementations, the MultiValue query language differs from SQL in several respects. Each query is issued against a single dictionary within the schema, which could be understood as a virtual file or a portal to the database through which to view the data.
LIST PEOPLE LAST_NAME FIRST_NAME EMAIL_ADDRESSES WITH LAST_NAME LIKE "Van..."
The above statement would list all e-mail addresses for each person whose last name starts with "Van". A single entry would be output for each person, with multiple lines showing the multiple e-mail addresses (without repeating other data about the person).
== See also ==
Rocket U2 (UniVerse and UniData)
OpenQM by Ladybridge Systems
Reality by Northgate-IS
Caché by InterSystems
== References ==
== External links ==
DB-Engines Ranking of Multivalue DBMS by popularity, updated monthly
Zeobase: A free multivalue database | Wikipedia/Multivalue_model |
The following tables compare general and technical information for a number of relational database management systems. Please see the individual products' articles for further information. Unless otherwise specified in footnotes, comparisons are based on the stable versions without any add-ons, extensions or external programs.
== General information ==
== Operating system support ==
The operating systems that the RDBMSes can run on.
== Fundamental features ==
Information about what fundamental RDBMS features are implemented natively.
Note (1): Currently only supports read uncommitted transaction isolation. Version 1.9 adds serializable isolation and version 2.0 will be fully ACID compliant.
Note (2): MariaDB and MySQL provide ACID compliance through the default InnoDB storage engine.
Note (3): "For other than InnoDB storage engines, MySQL Server parses and ignores the FOREIGN KEY and REFERENCES syntax in CREATE TABLE statements. The CHECK clause is parsed but ignored by all storage engines."
Note (4): Support for Unicode is new in version 10.0.
Note (5): MySQL provides GUI interface through MySQL Workbench.
Note (6): OpenEdge SQL database engine uses Referential Integrity, OpenEdge ABL Database engine does not and is handled via database triggers.
== Limits ==
Information about data size limits.
Note (1): Firebird 2.x maximum database size is effectively unlimited with the largest known database size >980 GB. Firebird 1.5.x maximum database size: 32 TB.
Note (2): Limit is 1038 using DECIMAL datatype.
Note (3): InnoDB is limited to 8,000 bytes (excluding VARBINARY, VARCHAR, BLOB, or TEXT columns).
Note (4): InnoDB is limited to 1,017 columns.
Note (6): Using VARCHAR (MAX) in SQL 2005 and later.
Note (7): When using a page size of 32 KB, and when BLOB/CLOB data is stored in the database file.
Note (8): Java array size limit of 2,147,483,648 (231) objects per array applies. This limit applies to number of characters in names, rows per table, columns per table, and characters per CHAR/VARCHAR.
Note (9): Despite the lack of a date datatype, SQLite does include date and time functions, which work for timestamps between 24 November 4714 B.C. and 1 November 5352.
Note (10): Informix DATETIME type has adjustable range from YEAR only through 1/10000th second. DATETIME date range is 0001-01-01 00:00:00.00000 through 9999-12-31 23:59:59.99999.
Note (11): Since version 12c. Earlier versions support up to 4000 B.
Note (12): The 0.5 YB limit refers to the storage limit of a single Informix server instance beginning with v15.0. Informix v12.10 and later versions support using sharding techniques to distribute a table across multiple server instances. A distributed Informix database has no upper limit on table or database size.
Note (13): Informix DECIMAL type supports up to 32 decimal digits of precision with a range of 10−130 to 10125. Fixed and variable precision are supported.
Note (14): The LONGLVARCHAR type supports strings up to 4TB.
== Tables and views ==
Information about what tables and views (other than basic ones) are supported natively.
Note (1): Server provides tempdb, which can be used for public and private (for the session) temp tables.
Note (2): Materialized views are not supported in Informix; the term is used in IBM's documentation to refer to a temporary table created to run the view's query when it is too complex, but one cannot for example define the way it is refreshed or build an index on it. The term is defined in the Informix Performance Guide.
Note (4): Materialized views can be emulated using stored procedures and triggers.
== Indexes ==
Information about what indexes (other than basic B-/B+ tree indexes) are supported natively.
Note (1): The users need to use a function from freeAdhocUDF library or similar.
Note (2): Can be implemented for most data types using expression-based indexes.
Note (3): Can be emulated by indexing a computed column (doesn't easily update) or by using an "Indexed View" (proper name not just any view works).
Note (4): Used for InMemory ColumnStore index, temporary hash index for hash join, Non/Cluster & fill factor.
Note (5): InnoDB automatically generates adaptive hash index entries as needed.
Note (6): Can be implemented using Function-based Indexes in Oracle 8i and higher, but the function needs to be used in the sql for the index to be used.
Note (7): A PostgreSQL functional index can be used to reverse the order of a field.
Note (10): B+ tree and full-text only for now.
Note (11): R-Tree indexing available in base edition with Locator but some functionality requires Personal Edition or Enterprise Edition with Spatial option.
Note (12): FOT or Forest of Trees indexes is a type of B-tree index consisting of multiple B-trees which reduces contention in multi-user environments.
== Database capabilities ==
Note (1): Recursive CTEs introduced in 11gR2 supersedes similar construct called CONNECT BY.
== Data types ==
== Other objects ==
Information about what other objects are supported natively.
Note (1): Both function and procedure refer to internal routines written in SQL and/or procedural language like PL/SQL. External routine refers to the one written in the host languages, such as C, Java, Cobol, etc. "Stored procedure" is a commonly used term for these routine types. However, its definition varies between different database vendors.
Note (2): In Derby, H2, LucidDB, and CUBRID, users code functions and procedures in Java.
Note (3): ENUM datatype exists. CHECK clause is parsed, but not enforced in runtime.
Note (5): Informix supports external functions written in Java, C, & C++.
== Partitioning ==
Information about what partitioning methods are supported natively.
== Access control ==
Information about access control functionalities.
Note (1): Network traffic could be transmitted in a secure way (not clear-text, in general SSL encryption). Precise if option is default, included option or an extra modules to buy.
Note (2): Options are present to set a minimum size for password, respect complexity like presence of numbers or special characters.
Note (3): How do you get security updates? Is it free access, do you need a login or to pay? Is there easy access through a Web/FTP portal or RSS feed or only through offline access (mail CD-ROM, phone).
Note (4): Does database process run as root/administrator or unprivileged user? What is default configuration?
Note (5): Is there a separate user to manage special operation like backup (only dump/restore permissions), security officer (audit), administrator (add user/create database), etc.? Is it default or optional?
Note (6): Common Criteria certified product list.
Note (7): FirebirdSQL seems to only have SYSDBA user and DB owner. There are no separate roles for backup operator and security administrator.
Note (8): User can define a dedicated backup user but nothing particular in default install.
Note (9): Authentication methods.
Note (10): Informix Dynamic Server supports PAM and other configurable authentication. By default uses OS authentication.
Note (11): Authentication methods.
Note (12): With the use of Pervasive AuditMaster.
Note (13): User-based security is optional in Polyhedra, but when enabled can be enhanced to a role-based model with auditing.
== Databases vs schemas (terminology) ==
The SQL specification defines what an "SQL schema" is; however, databases implement it differently. To compound this confusion the functionality can overlap with that of a parent database. An SQL schema is simply a namespace within a database; things within this namespace are addressed using the member operator dot ".". This seems to be a universal among all of the implementations.
A true fully (database, schema, and table) qualified query is exemplified as such: SELECT * FROM database.schema.table
Both a schema and a database can be used to isolate one table, "foo", from another like-named table "foo". The following is pseudo code:
SELECT * FROM database1.foo vs. SELECT * FROM database2.foo (no explicit schema between database and table)
SELECT * FROM [database1.]default.foo vs. SELECT * FROM [database1.]alternate.foo (no explicit database prefix)
The problem that arises is that former MySQL users will create multiple databases for one project. In this context, MySQL databases are analogous in function to PostgreSQL-schemas, insomuch as PostgreSQL deliberately lacks off-the-shelf cross-database functionality (preferring multi-tenancy) that MySQL has. Conversely, PostgreSQL has applied more of the specification implementing cross-table, cross-schema, and then left room for future cross-database functionality.
MySQL aliases schema with database behind the scenes, such that CREATE SCHEMA and CREATE DATABASE are analogs. It can therefore be said that MySQL has implemented cross-database functionality, skipped schema functionality entirely, and provided similar functionality into their implementation of a database. In summary, PostgreSQL fully supports schemas and multi-tenancy by strictly separating databases from each other and thus lacks some functionality MySQL has with databases, while MySQL does not even attempt to support standard schemas.
Oracle has its own spin where creating a user is synonymous with creating a schema. Thus a database administrator can create a user called PROJECT and then create a table PROJECT.TABLE. Users can exist without schema objects, but an object is always associated with an owner (though that owner may not have privileges to connect to the database). With the 'shared-everything' Oracle RAC architecture, the same database can be opened by multiple servers concurrently. This is independent of replication, which can also be used, whereby the data is copied for use by different servers. In the Oracle implementation, a 'database' is a set of files which contains the data while the 'instance' is a set of processes (and memory) through which a database is accessed.
Informix supports multiple databases in a server instance like MySQL. It supports the CREATE SCHEMA syntax as a way to group DDL statements into a single unit creating all objects created as a part of the schema as a single owner. Informix supports a database mode called ANSI mode which supports creating objects with the same name but owned by different users.
PostgreSQL and some other databases have support for foreign schemas, which is the ability to import schemas from other servers as defined in ISO/IEC 9075-9 (published as part of SQL:2008). This appears like any other schema in the database according to the SQL specification while accessing data stored either in a different database or a different server instance. The import can be made either as an entire foreign schema or merely certain tables belonging to that foreign schema. While support for ISO/IEC 9075-9 bridges the gap between the two competing philosophies surrounding schemas, MySQL and Informix maintain an implicit association between databases while ISO/IEC 9075-9 requires that any such linkages be explicit in nature.
== See also ==
Relational database management system (includes market share data)
List of relational database management systems
Comparison of object–relational database management systems
Comparison of database administration tools
Object database – some of which have relational (SQL/ODBC) interfaces.
IBM Business System 12 – an historical RDBMS and related query language.
== References ==
== External links ==
Comparison of different SQL implementations against SQL standards. Includes Oracle, Db2, Microsoft SQL Server, MySQL and PostgreSQL. (8 June 2007)
The SQL92 standard
DMBS comparison by SQL Workbench | Wikipedia/Comparison_of_relational_database_management_systems |
Cincom Systems, Inc., is a privately held multinational computer technology corporation founded in 1968 by Tom Nies, Tom Richley, and Claude Bogardus. The company’s first product, Total, was the first commercial database management system that was not bundled with manufacturer hardware and proprietary software. In June 2024, Cincom Systems Inc. was acquired by PartnerOne, a Canada-based enterprise software company. At the time of the sale, Cincom had 400 employees both in the US and internationally.
== History ==
Cincom Systems was founded in 1968, when the product focus in the computer industry was far more on hardware than software, and mass merchandising in the industry was nonexistent. Cincom was quoted by IBM as being "the original database company" in 2017.
By the late 1960s, Tom Nies, a salesman and project manager at IBM, had noticed that software was becoming a more important component of computer systems and decided to work for a business that sold software. The only software businesses in existence at that time were a small number of service bureaus, none of which was located in Cincinnati, where Nies resided. Convinced that software was a potential profit center, rather than a drain on profits, as was then viewed by IBM management, Thomas M. Nies, left IBM late 1968 and brought along Tom Richley and Claude Bogardus. This executive trio functioned as sales and marketing (Nies), product development (Richley), and research and development (Bogardus). In 1968 Nies joined Claude Bogardus and Tom Richley to found Cincom Systems. The name Cincom comes from the portmanteau of "Cincinnati" and "computer". This is due to the company being founded in Cincinnati, Ohio. The company initially only wrote programs for individual companies. By March 1969, the company became a full-service organization by adding principals Judy Foegle Carlson (administration), George Fanady (custom systems), Doug Hughes (systems engineering), and Jan Litton (product installation).
Within its first year, the company realized that it was solving the same data management problems for its various clients. Nies proposed the solution of developing a core database management system that could be sold to multiple customers. Total was the result of this development effort. As the company’s first product, Total, was the first commercial database management system that was not bundled with manufacturer hardware and proprietary software. At a time when each application program "owned" the data it used, a company often had multiple copies of similar information:
"... people would get five different reports and the inventory balances would say five different things. What were our sales during April? Well, you'd get five different numbers, depending on how you total things up."
The problem was known, and CODASYL's Database Task Group Report wrote about it, as did General Electric and IBM. Cincom's TOTAL "segregated out the programming logic from the application of the database."
Despite IBM being "where the money was," there was still the problem of compatibility between large systems running OS/360 or small systems running DOS/360, so they "implemented 70 to 80 percent of the application programming logic in such a way
that it insulated the user from" whichever they used; some used both.
Starting in 1971, Cincom opened offices in Canada, England, Belgium, France, Italy, Australia, Japan, Brazil and Hong Kong.
By 1980, TOTAL product sales reached $250 million.On August 20, 1984, U.S. President Ronald Reagan called Cincom and Tom Nies "the epitome of entrepreneurial spirit of American business." Cincom Systems was described in 2001 as "a venerable software firm, included in the Smithsonian national museum along with Microsoft as a software pioneer." In 2007, Cincom generated over $100 million in revenue for the 21st straight year, a feat unmatched by any private software publisher in the world. Microsoft (a public company) is the only other software publisher in the world to reach this milestone.
From 1968 until February 2017, Nies served as Cincom Systems president. He also served as chairman. Greg Mills became President. By 2021, Nies was considered the longest actively serving CEO in the computer industry.
In June 2024, Cincom Systems Inc. was acquired by PartnerOne, a Canada-based enterprise software company. Terms of the deal were not disclosed at the time, and Cincom's founder Tom Nies stepped down from his post at the company to retire. He had been CEO of Cincom since its founding in 1968, making him the longest actively serving CEO in the computer industry. At the time of the sale, Cincom had 400 employees both in the US and internationally.
== Product history ==
=== 1968 to 1969 ===
Initially the company simply wrote programs for local companies. They would use the data management aspects of many programs with reasonable similarities to develop the product called Total, which was seen as an improvement and generalization of IBM's DBOMP.
Other than IBM, which was still in the "selling iron" business, Cincom became the first U.S. software firm to promote the concept of a database management system (DBMS). Cincom delivered the first commercial database management system that was not bundled with a computer manufacturer's hardware and proprietary software.
=== 1970s and 1980s ===
Cincom introduced several new products during the 1970s, including:
ENVIRON/1 (1971), a control system for teleprocessing networks.
SOCRATES (1972), a data retrieval system for receiving reports from the TOTAL database system.
T-ASK (1975), an Interactive Query Language for Harris computers.
MANTIS (1978), an application generator. It has developed enough of a following to still be the focus of attention in 2017.
Manufacturing Resource Planning System (1979), a packaged ERP field data system for manufacturers that is the ancestor of today's CONTROL system.
New products introduced in the 1980s included:
EPOCH-FMS (1980), a directory-driven financial management system.
Series 80 Data Control System (1980), an interactive online data dictionary.
TOTAL Information System (1982), a directory-driven database management system.
ULTRA (1983), an interactive database management system for DEC's VAX hardware and VMS operating system. This offering was part of a strategic move to recognize DEC, and quickly resulted in one out of five customer product purchases being for VAX systems.
PC CONTACT (1984), a fully integrated, single-step communications facility that interactively linked an IBM mainframe computer with the user's IBM personal computer.
MANAGE User Series (1984), an integrated, decision-support system that combined extensive personal computing capabilities with the power and control of the mainframe.
SUPRA for SQL (structured query language) (1989).
CASE Environment (1989), a series of integrated components that assisted users who were facing cross-platform development demand from multiple areas within their computers.
Comprehensive Planning & Control System (CPCS) (1989), a resource and project guidance system that centralized management of resources and activities.
=== 1990s ===
New products during the 1990s, included:
AD/Advantage (1991), an application development system that automated development and maintenance activities throughout all phases of the application life cycle. AD/Advantage is a component f MANTIS.
XpertRule (1993), a knowledge specification and generation system.
TOTAL FrameWork (1995), a set of object-oriented frameworks, services and integrated development environments (IDEs) for the assembly and maintenance of Smalltalk, Java, C++ and Visual Basic business applications.
Cincom Acquire (1995), an integrated selling system for companies that deliver complex products and services.
AuroraDS (1995), an enterprise-wide solution that allowed organizations to automate document creation, production, output and management in a client/server environment.
SPECTRA (1997), a system that provided customer administration and resource efficiency for telecommunications, utilities and service industries.
gOOi (1997), a solution that turns traditional server-based applications into graphical integrated desktop (client) applications.
Cincom Encompass (1998), a suite of integrated components for next-generation call centers.
Cincom Smalltalk (1999), a suite that includes VisualWorks and the ObjectStudio Enterprise development environment.
Cincom iC Solutions (1999), a technology that combines sales and marketing automation with knowledge-based support for product and service configuration.
=== 2000 to the present ===
New products include:
Cincom Knowledge Builder (2001), a business-rules management system that streamlines sales and service processes by providing advice and guidance at the point of customer interaction.
Cincom TIGER (2002), a tool that integrates all data sources within an organization.
ENVIRON (2003), an enabling technology that helps manufacturers integrate their business systems, improve their business processes and eliminate waste throughout their organizations.
Cincom Synchrony (2004), a customer-experience management system for multi-channel contact centers.
Cincom Eloquence (2006), a document-composition application that generates dynamic-structured and free-form documents.
Cincom CPQ, configure-price-quote software that can integrate with Microsoft Dynamics, Salesforce and other CRM systems to create a complete multi-channel selling tool that simplifies sales processes and product configurations.
== References and footnotes ==
== External links ==
Cincom Systems Inc v. Novelis Corp – the latter's predecessor licensed from Cincom, lost license by changing company name | Wikipedia/Cincom_Systems |
A graph database (GDB) is a database that uses graph structures for semantic queries with nodes, edges, and properties to represent and store data. A key concept of the system is the graph (or edge or relationship). The graph relates the data items in the store to a collection of nodes and edges, the edges representing the relationships between the nodes. The relationships allow data in the store to be linked together directly and, in many cases, retrieved with one operation. Graph databases hold the relationships between data as a priority. Querying relationships is fast because they are perpetually stored in the database. Relationships can be intuitively visualized using graph databases, making them useful for heavily inter-connected data.
Graph databases are commonly referred to as a NoSQL database. Graph databases are similar to 1970s network model databases in that both represent general graphs, but network-model databases operate at a lower level of abstraction and lack easy traversal over a chain of edges.
The underlying storage mechanism of graph databases can vary. Relationships are first-class citizens in a graph database and can be labelled, directed, and given properties. Some depend on a relational engine and store the graph data in a table (although a table is a logical element, therefore this approach imposes a level of abstraction between the graph database management system and physical storage devices). Others use a key–value store or document-oriented database for storage, making them inherently NoSQL structures.
As of 2021, no graph query language has been universally adopted in the same way as SQL was for relational databases, and there are a wide variety of systems, many of which are tightly tied to one product. Some early standardization efforts led to multi-vendor query languages like Gremlin, SPARQL, and Cypher. In September 2019 a proposal for a project to create a new standard graph query language (ISO/IEC 39075 Information Technology — Database Languages — GQL) was approved by members of ISO/IEC Joint Technical Committee 1(ISO/IEC JTC 1). GQL is intended to be a declarative database query language, like SQL. In addition to having query language interfaces, some graph databases are accessed through application programming interfaces (APIs).
Graph databases differ from graph compute engines. Graph databases are technologies that are translations of the relational online transaction processing (OLTP) databases. On the other hand, graph compute engines are used in online analytical processing (OLAP) for bulk analysis. Graph databases attracted considerable attention in the 2000s, due to the successes of major technology corporations in using proprietary graph databases, along with the introduction of open-source graph databases.
One study concluded that an RDBMS was "comparable" in performance to existing graph analysis engines at executing graph queries.
== History ==
In the mid-1960s, navigational databases such as IBM's IMS supported tree-like structures in its hierarchical model, but the strict tree structure could be circumvented with virtual records.
Graph structures could be represented in network model databases from the late 1960s. CODASYL, which had defined COBOL in 1959, defined the Network Database Language in 1969.
Labeled graphs could be represented in graph databases from the mid-1980s, such as the Logical Data Model.
Commercial object databases (ODBMSs) emerged in the early 1990s. In 2000, the Object Data Management Group published a standard language for defining object and relationship (graph) structures in their ODMG'93 publication.
Several improvements to graph databases appeared in the early 1990s, accelerating in the late 1990s with endeavors to index web pages.
In the mid-to-late 2000s, commercial graph databases with ACID guarantees such as Neo4j and Oracle Spatial and Graph became available.
In the 2010s, commercial ACID graph databases that could be scaled horizontally became available. Further, SAP HANA brought in-memory and columnar technologies to graph databases. Also in the 2010s, multi-model databases that supported graph models (and other models such as relational database or document-oriented database) became available, such as OrientDB, ArangoDB, and MarkLogic (starting with its 7.0 version). During this time, graph databases of various types have become especially popular with social network analysis with the advent of social media companies. Also during the decade, cloud-based graph databases such as Amazon Neptune and Neo4j AuraDB became available.
== Background ==
Graph databases portray the data as it is viewed conceptually. This is accomplished by transferring the data into nodes and its relationships into edges.
A graph database is a database that is based on graph theory. It consists of a set of objects, which can be a node or an edge.
Nodes represent entities or instances such as people, businesses, accounts, or any other item to be tracked. They are roughly the equivalent of a record, relation, or row in a relational database, or a document in a document-store database.
Edges, also termed graphs or relationships, are the lines that connect nodes to other nodes; representing the relationship between them. Meaningful patterns emerge when examining the connections and interconnections of nodes, properties and edges. The edges can either be directed or undirected. In an undirected graph, an edge connecting two nodes has a single meaning. In a directed graph, the edges connecting two different nodes have different meanings, depending on their direction. Edges are the key concept in graph databases, representing an abstraction that is not directly implemented in a relational model or a document-store model.
Properties are information associated to nodes. For example, if Wikipedia were one of the nodes, it might be tied to properties such as website, reference material, or words that starts with the letter w, depending on which aspects of Wikipedia are germane to a given database.
== Graph models ==
=== Labeled-property graph ===
A labeled-property graph model is represented by a set of nodes, relationships, properties, and labels. Both nodes of data and their relationships are named and can store properties represented by key–value pairs. Nodes can be labelled to be grouped. The edges representing the relationships have two qualities: they always have a start node and an end node, and are directed; making the graph a directed graph. Relationships can also have properties. This is useful in providing additional metadata and semantics to relationships of the nodes. Direct storage of relationships allows a constant-time traversal.
=== Resource Description Framework (RDF) ===
In an RDF graph model, each addition of information is represented with a separate node. For example, imagine a scenario where a user has to add a name property for a person represented as a distinct node in the graph. In a labeled-property graph model, this would be done with an addition of a name property into the node of the person. However, in an RDF, the user has to add a separate node called hasName connecting it to the original person node. Specifically, an RDF graph model is composed of nodes and arcs. An RDF graph notation or a statement is represented by: a node for the subject, a node for the object, and an arc for the predicate. A node may be left blank, a literal and/or be identified by a URI. An arc may also be identified by a URI. A literal for a node may be of two types: plain (untyped) and typed. A plain literal has a lexical form and optionally a language tag. A typed literal is made up of a string with a URI that identifies a particular datatype. A blank node may be used to accurately illustrate the state of the data when the data does not have a URI.
== Properties ==
Graph databases are a powerful tool for graph-like queries. For example, computing the shortest path between two nodes in the graph. Other graph-like queries can be performed over a graph database in a natural way (for example graph's diameter computations or community detection).
Graphs are flexible, meaning it allows the user to insert new data into the existing graph without loss of application functionality. There is no need for the designer of the database to plan out extensive details of the database's future use cases.
=== Storage ===
The underlying storage mechanism of graph databases can vary. Some depend on a relational engine and "store" the graph data in a table (although a table is a logical element, therefore this approach imposes another level of abstraction between the graph database, the graph database management system and the physical devices where the data is actually stored). Others use a key–value store or document-oriented database for storage, making them inherently NoSQL structures. A node would be represented as any other document store, but edges that link two different nodes hold special attributes inside its document; a _from and _to attributes.
=== Index-free adjacency ===
Data lookup performance is dependent on the access speed from one particular node to another. Because index-free adjacency enforces the nodes to have direct physical RAM addresses and physically point to other adjacent nodes, it results in a fast retrieval. A native graph system with index-free adjacency does not have to move through any other type of data structures to find links between the nodes. Directly related nodes in a graph are stored in the cache once one of the nodes are retrieved, making the data lookup even faster than the first time a user fetches a node. However, such advantage comes at a cost. Index-free adjacency sacrifices the efficiency of queries that do not use graph traversals. Native graph databases use index-free adjacency to process CRUD operations on the stored data.
== Applications ==
Multiple categories of graphs by kind of data have been recognised. Gartner suggests the five broad categories of graphs:
Social graph: this is about the connections between people; examples include Facebook, Twitter, and the idea of six degrees of separation
Intent graph: this deals with reasoning and motivation.
Consumption graph: also known as the "payment graph", the consumption graph is heavily used in the retail industry. E-commerce companies such as Amazon, eBay and Walmart use consumption graphs to track the consumption of individual customers.
Interest graph: this maps a person's interests and is often complemented by a social graph. It has the potential to follow the previous revolution of web organization by mapping the web by interest rather than indexing webpages.
Mobile graph: this is built from mobile data. Mobile data in the future may include data from the web, applications, digital wallets, GPS, and Internet of Things (IoT) devices.
== Comparison with relational databases ==
Since Edgar F. Codd's 1970 paper on the relational model, relational databases have been the de facto industry standard for large-scale data storage systems. Relational models require a strict schema and data normalization which separates data into many tables and removes any duplicate data within the database. Data is normalized in order to preserve data consistency and support ACID transactions. However this imposes limitations on how relationships can be queried.
One of the relational model's design motivations was to achieve a fast row-by-row access. Problems arise when there is a need to form complex relationships between the stored data. Although relationships can be analyzed with the relational model, complex queries performing many join operations on many different attributes over several tables are required. In working with relational models, foreign key constraints should also be considered when retrieving relationships, causing additional overhead.
Compared with relational databases, graph databases are often faster for associative data sets and map more directly to the structure of object-oriented applications. They can scale more naturally to large datasets as they do not typically need join operations, which can often be expensive. As they depend less on a rigid schema, they are marketed as more suitable to manage ad hoc and changing data with evolving schemas.
Conversely, relational database management systems are typically faster at performing the same operation on large numbers of data elements, permitting the manipulation of the data in its natural structure. Despite the graph databases' advantages and recent popularity over relational databases, it is recommended the graph model itself should not be the sole reason to replace an existing relational database. A graph database may become relevant if there is an evidence for performance improvement by orders of magnitude and lower latency.
=== Examples ===
The relational model gathers data together using information in the data. For example, one might look for all the "users" whose phone number contains the area code "311". This would be done by searching selected datastores, or tables, looking in the selected phone number fields for the string "311". This can be a time-consuming process in large tables, so relational databases offer indexes, which allow data to be stored in a smaller sub-table, containing only the selected data and a unique key (or primary key) of the record. If the phone numbers are indexed, the same search would occur in the smaller index table, gathering the keys of matching records, and then looking in the main data table for the records with those keys. Usually, a table is stored in a way that allows a lookup via a key to be very fast.
Relational databases do not inherently contain the idea of fixed relationships between records. Instead, related data is linked to each other by storing one record's unique key in another record's data. For example, a table containing email addresses for users might hold a data item called userpk, which contains the primary key of the user record it is associated with. In order to link users and their email addresses, the system first looks up the selected user records primary keys, looks for those keys in the userpk column in the email table (or, more likely, an index of them), extracts the email data, and then links the user and email records to make composite records containing all the selected data. This operation, termed a join, can be computationally expensive. Depending on the complexity of the query, the number of joins, and indexing various keys, the system may have to search through multiple tables and indexes and then sort it all to match it together.
In contrast, graph databases directly store the relationships between records. Instead of an email address being found by looking up its user's key in the userpk column, the user record contains a pointer that directly refers to the email address record. That is, having selected a user, the pointer can be followed directly to the email records, there is no need to search the email table to find the matching records. This can eliminate the costly join operations. For example, if one searches for all of the email addresses for users in area code "311", the engine would first perform a conventional search to find the users in "311", but then retrieve the email addresses by following the links found in those records. A relational database would first find all the users in "311", extract a list of the primary keys, perform another search for any records in the email table with those primary keys, and link the matching records together. For these types of common operations, graph databases would theoretically be faster.
The true value of the graph approach becomes evident when one performs searches that are more than one level deep. For example, consider a search for users who have "subscribers" (a table linking users to other users) in the "311" area code. In this case a relational database has to first search for all the users with an area code in "311", then search the subscribers table for any of those users, and then finally search the users table to retrieve the matching users. In contrast, a graph database would search for all the users in "311", then follow the backlinks through the subscriber relationship to find the subscriber users. This avoids several searches, look-ups, and the memory usage involved in holding all of the temporary data from multiple records needed to construct the output. In terms of big O notation, this query would be
O
(
log
n
)
+
O
(
1
)
{\displaystyle O(\log n)+O(1)}
time – i.e., proportional to the logarithm of the size of the data. In contrast, the relational version would be multiple
O
(
log
n
)
{\displaystyle O(\log n)}
lookups, plus the
O
(
n
)
{\displaystyle O(n)}
time needed to join all of the data records.
The relative advantage of graph retrieval grows with the complexity of a query. For example, one might want to know "that movie about submarines with the actor who was in that movie with that other actor that played the lead in Gone With the Wind". This first requires the system to find the actors in Gone With the Wind, find all the movies they were in, find all the actors in all of those movies who were not the lead in Gone With the Wind, and then find all of the movies they were in, finally filtering that list to those with descriptions containing "submarine". In a relational database, this would require several separate searches through the movies and actors tables, doing another search on submarine movies, finding all the actors in those movies, and then comparing the (large) collected results. In contrast, the graph database would walk from Gone With the Wind to Clark Gable, gather the links to the movies he has been in, gather the links out of those movies to other actors, and then follow the links out of those actors back to the list of movies. The resulting list of movies can then be searched for "submarine". All of this can be done via one search.
Properties add another layer of abstraction to this structure that also improves many common queries. Properties are essentially labels that can be applied to any record, or in some cases, edges as well. For example, one might label Clark Gable as "actor", which would then allow the system to quickly find all the records that are actors, as opposed to director or camera operator. If labels on edges are allowed, one could also label the relationship between Gone With the Wind and Clark Gable as "lead", and by performing a search on people that are "lead" "actor" in the movie Gone With the Wind, the database would produce Vivien Leigh, Olivia de Havilland and Clark Gable. The equivalent SQL query would have to rely on added data in the table linking people and movies, adding more complexity to the query syntax. These sorts of labels may improve search performance under certain circumstances, but are generally more useful in providing added semantic data for end users.
Relational databases are very well suited to flat data layouts, where relationships between data are only one or two levels deep. For example, an accounting database might need to look up all the line items for all the invoices for a given customer, a three-join query. Graph databases are aimed at datasets that contain many more links. They are especially well suited to social networking systems, where the "friends" relationship is essentially unbounded. These properties make graph databases naturally suited to types of searches that are increasingly common in online systems, and in big data environments. For this reason, graph databases are becoming very popular for large online systems like Facebook, Google, Twitter, and similar systems with deep links between records.
To further illustrate, imagine a relational model with two tables: a people table (which has a person_id and person_name column) and a friend table (with friend_id and person_id, which is a foreign key from the people table). In this case, searching for all of Jack's friends would result in the following SQL query.
The same query may be translated into --
Cypher, a graph database query language
SPARQL, an RDF graph database query language standardized by W3C and used in multiple RDF Triple and Quad stores
Long form
Short form
SPASQL, a hybrid database query language, that extends SQL with SPARQL
The above examples are a simple illustration of a basic relationship query. They condense the idea of relational models' query complexity that increases with the total amount of data. In comparison, a graph database query is easily able to sort through the relationship graph to present the results.
There are also results that indicate simple, condensed, and declarative queries of the graph databases do not necessarily provide good performance in comparison to the relational databases. While graph databases offer an intuitive representation of data, relational databases offer better results when set operations are needed.
== List of graph databases ==
The following is a list of notable graph databases:
== Graph query-programming languages ==
AQL (ArangoDB Query Language): a SQL-like query language used in ArangoDB for both documents and graphs
Cypher Query Language (Cypher): a graph query declarative language for Neo4j that enables ad hoc and programmatic (SQL-like) access to the graph.
GQL: proposed ISO standard graph query language
GraphQL: an open-source data query and manipulation language for APIs. Dgraph implements modified GraphQL language called DQL (formerly GraphQL+-)
Gremlin: a graph programming language that is a part of Apache TinkerPop open-source project
SPARQL: a query language for RDF databases that can retrieve and manipulate data stored in RDF format
regular path queries, a theoretical language for queries on graph databases
== See also ==
Graph transformation
Hierarchical database model
Datalog
Vadalog
Object database
RDF Database
Structured storage
Text graph
Wikidata is a Wikipedia sister project that stores data in a graph database. Ordinary web browsing allows for viewing nodes, following edges, and running SPARQL queries.
== References == | Wikipedia/GraphDB |
A federated database system (FDBS) is a type of meta-database management system (DBMS), which transparently maps multiple autonomous database systems into a single federated database. The constituent databases are interconnected via a computer network and may be geographically decentralized. Since the constituent database systems remain autonomous, a federated database system is a contrastable alternative to the (sometimes daunting) task of merging several disparate databases. A federated database, or virtual database, is a composite of all constituent databases in a federated database system. There is no actual data integration in the constituent disparate databases as a result of data federation.
Through data abstraction, federated database systems can provide a uniform user interface, enabling users and clients to store and retrieve data from multiple noncontiguous databases with a single query—even if the constituent databases are heterogeneous. To this end, a federated database system must be able to decompose the query into subqueries for submission to the relevant constituent DBMSs, after which the system must composite the result sets of the subqueries. Because various database management systems employ different query languages, federated database systems can apply wrappers to the subqueries to translate them into the appropriate query languages.
== Definition ==
McLeod and Heimbigner were among the first to define a federated database system in the mid-1980s.
A FDBS is one which "define[s] the architecture and interconnect[s] databases that minimize central authority yet support partial sharing and coordination among database systems". This description might not accurately reflect the McLeod/Heimbigner definition of a federated database. Rather, this description fits what McLeod/Heimbigner called a composite database. McLeod/Heimbigner's federated database is a collection of autonomous components that make their data available to other members of the federation through the publication of an export schema and access operations; there is no unified, central schema that encompasses the information available from the members of the federation.
Among other surveys, practitioners define a Federated Database as a collection of cooperating component systems which are autonomous and are possibly heterogeneous.
The three important components of an FDBS are autonomy, heterogeneity and distribution. Another dimension which has also been considered is the Networking Environment Computer Network, e.g., many DBSs over a LAN or many DBSs over a WAN update related functions of participating DBSs (e.g., no updates, nonatomic transitions, atomic updates).
== FDBS architecture ==
A DBMS can be classified as either centralized or distributed. A centralized system manages a single database while distributed manages multiple databases. A component DBS in a DBMS may be centralized or distributed. A multiple DBS (MDBS) can be classified into two types depending on the autonomy of the component DBS as federated and non federated. A nonfederated database system is an integration of component DBMS that are not autonomous.
A federated database system consists of component DBS that are autonomous yet participate in a federation to allow partial and controlled sharing of their data.
Federated architectures differ based on levels of integration with the component database systems and the extent of services offered by the federation. A FDBS can be categorized as loosely or tightly coupled systems.
Loosely Coupled require component databases to construct their own federated schema. A user will typically access other component database systems by using a multidatabase language but this removes any levels of location transparency, forcing the user to have direct knowledge of the federated schema. A user imports the data they require from other component databases and integrates it with their own to form a federated schema.
Tightly coupled system consists of component systems that use independent processes to construct and publicize an integrated federated schema.
Multiple DBS of which FDBS are a specific type can be characterized along three dimensions: Distribution, Heterogeneity and Autonomy. Another characterization could be based on the dimension of networking, for example single databases or multiple databases in a LAN or WAN.
=== Distribution ===
Distribution of data in an FDBS is due to the existence of a multiple DBS before an FDBS is built. Data can be distributed among multiple databases which could be stored in a single computer or multiple computers. These computers could be geographically located in different places but interconnected by a network. The benefits of data distribution help in increased availability and reliability as well as improved access times.
==== Heterogeneity ====
Heterogeneities in databases arise due to factors such as differences in structures, semantics of data, the constraints supported or query language. Differences in structure occur when two data models provide different primitives such as object oriented (OO) models that support specialization and inheritance and relational models that do not. Differences due to constraints occur when two models support two different constraints. For example, the set type in CODASYL schema may be partially modeled as a referential integrity constraint in a relationship schema. CODASYL supports insertion and retention that are not captured by referential integrity alone. The query language supported by one DBMS can also contribute to heterogeneity between other component DBMSs. For example, differences in query languages with the same data models or different versions of query languages could contribute to heterogeneity.
Semantic heterogeneities arise when there is a disagreement about meaning, interpretation or intended use of data. At the schema and data level, classification of possible heterogeneities include:
Naming conflicts e.g. databases using different names to represent the same concept.
Domain conflicts or data representation conflicts e.g. databases using different values to represent same concept.
Precision conflicts e.g. databases using same data values from domains of different cardinalities for same data.
Metadata conflicts e.g. same concepts are represented at schema level and instance level.
Data conflicts e.g. missing attributes
Schema conflicts e.g. table versus table conflict which includes naming conflicts, data conflicts etc.
In creating a federated schema, one has to resolve such heterogeneities before integrating the component DB schemas.
==== Schema matching, schema mapping ====
Dealing with incompatible data types or query syntax is not the only obstacle to a concrete implementation of an FDBS. In systems that are not planned top-down, a generic problem lies in matching semantically equivalent, but differently named parts from different schemas (=data models) (tables, attributes). A pairwise mapping between n attributes would result in
n
(
n
−
1
)
2
{\displaystyle n(n-1) \over 2}
mapping rules (given equivalence mappings) - a number that quickly gets too large for practical purposes. A common way out is to provide a global schema that comprises the relevant parts of all member schemas and provide mappings in the form of database views. Two principal approaches depend on the direction of the mapping:
Global as View (GaV): the global schema is defined in terms of the underlying schemas
Local as View (LaV): the local schemas are defined in terms of the global schema
Both are examples of data integration, called the schema matching problem.
=== Autonomy ===
Fundamental to the difference between an MDBS and an FDBS is the concept of autonomy. It is important to understand the aspects of autonomy for component databases and how they can be addressed when a component DBS participates in an FDBS.
There are four kinds of autonomies addressed:
Design Autonomy which refers to ability to choose its design irrespective of data, query language or conceptualization, functionality of the system implementation.
Heterogeneities in an FDBS are primarily due to design autonomy.
Communication autonomy refers to the general operation of the DBMS to communicate with other DBMS or not.
Execution autonomy allows a component DBMS to control the operations requested by local and external operations.
Association autonomy gives a power to component DBS to disassociate itself from a federation which means FDBS can operate independently of any single DBS.
The ANSI/X3/SPARC Study Group outlined a three level data description architecture, the components of which are the conceptual schema, internal schema and external schema of databases. The three level architecture is however inadequate to describing the architectures of an FDBS. It was therefore extended to support the three dimensions of the FDBS namely Distribution, Autonomy and Heterogeneity. The five level schema architecture is explained below.
=== Concurrency control ===
The Heterogeneity and Autonomy requirements pose special challenges concerning concurrency control in an FDBS, which is crucial for the correct execution of its concurrent transactions (see also Global concurrency control). Achieving global serializability, the major correctness criterion, under these requirements has been characterized as very difficult and unsolved.
== Five level schema architecture for FDBSs ==
The five level schema architecture includes the following:
Local Schema is basically the conceptual model of a component database expressed in a native data model.
Component schema is the subset of the local schema that the owner organisation is willing to share with other users of the FDBS and it is translated into a common data model.
Export Schema represents a subset of a component schema that is available to a particular federation. It may include access control information regarding its use by a specific federation user. The export schema helps in managing flow of control of data.
Federated Schema is an integration of multiple export schemas. It includes information on data distribution that is generated when integrating export schemas.
External schema is extracted from a federated schema, and is defined for the users/applications of a particular federation.
While accurately representing the state of the art in data integration, the Five Level Schema Architecture above does suffer from a major drawback, namely IT imposed look and feel. Modern data users demand control over how data is presented; their needs are somewhat in conflict with such bottom-up approaches to data integration.
== See also ==
Enterprise Information Integration (EII)
Data virtualization
Master data management (MDM)
Schema matching
Universal relation assumption
Linked data
SPARQL
== References ==
== External links ==
DB2 and Federated Databases
Issues of where to perform the join aka "pushdown" and other performance characteristics
Worked example federating Oracle, Informix, DB2, and Excel
Freitas, André, Edward Curry, João Gabriel Oliveira, and Sean O’Riain. 2012. “Querying Heterogeneous Datasets on the Linked Data Web: Challenges, Approaches, and Trends.” IEEE Internet Computing 16 (1): 24–33.
IBM Gaian Database: A dynamic Distributed Federated Database
Federated system and methods and mechanisms of implementing and using such a system | Wikipedia/Federated_database_system |
An entity–attribute–value model (EAV) is a data model optimized for the space-efficient storage of sparse—or ad-hoc—property or data values, intended for situations where runtime usage patterns are arbitrary, subject to user variation, or otherwise unforeseeable using a fixed design. The use-case targets applications which offer a large or rich system of defined property types, which are in turn appropriate to a wide set of entities, but where typically only a small, specific selection of these are instantiated (or persisted) for a given entity. Therefore, this type of data model relates to the mathematical notion of a sparse matrix.
EAV is also known as object–attribute–value model, vertical database model, and open schema.
== Data structure ==
This data representation is analogous to space-efficient methods of storing a sparse matrix, where only non-empty values are stored. In an EAV data model, each attribute–value pair is a fact describing an entity, and a row in an EAV table stores a single fact. EAV tables are often described as "long and skinny": "long" refers to the number of rows, "skinny" to the few columns.
Data is recorded as three columns:
The entity: the item being described.
The attribute or parameter: typically implemented as a foreign key into a table of attribute definitions. The attribute definitions table might contain the following columns: an attribute ID, attribute name, description, data type, and columns assisting input validation, e.g., maximum string length and regular expression, set of permissible values, etc.
The value of the attribute.
=== Example ===
Consider how one would try to represent a general-purpose clinical record in a relational database. Clearly creating a table (or a set of tables) with thousands of columns is not feasible, because the vast majority of columns would be null. To complicate things, in a longitudinal medical record that follows the patient over time, there may be multiple values of the same parameter: the height and weight of a child, for example, change as the child grows. Finally, the universe of clinical findings keeps growing: for example, diseases emerge and new lab tests are devised; this would require constant addition of columns, and constant revision of the user interface. The term "attribute volatility" is sometimes used to describe the problems or situations that arise when the list of available attributes or their definitions needs to evolve over time.
The following shows a selection of rows of an EAV table for clinical findings from a visit to a doctor for a fever on the morning of 1998-05-01. The entries shown within angle brackets are references to entries in other tables, shown here as text rather than as encoded foreign key values for ease of understanding. In this example, the values are all literal values, but they could also be pre-defined value lists. The latter are particularly useful when the possible values are known to be limited (i.e., enumerable).
The entity. For clinical findings, the entity is the patient event: a foreign key into a table that contains at a minimum a patient ID and one or more time-stamps (e.g., the start and end of the examination date/time) that record when the event being described happened.
The attribute or parameter: a foreign key into a table of attribute definitions (in this example, definitions of clinical findings). At the very least, the attribute definitions table would contain the following columns: an attribute ID, attribute name, description, data type, units of measurement, and columns assisting input validation, e.g., maximum string length and regular expression, maximum and minimum permissible values, set of permissible values, etc.
The value of the attribute. This would depend on the data type, and we discuss how values are stored shortly.
The example below illustrates symptoms findings that might be seen in a patient with pneumonia.
The EAV data described above is comparable to the contents of a supermarket sales receipt (which would be reflected in a Sales Line Items table in a database). The receipt lists only details of the items actually purchased, instead of listing every product in the shop that the customer might have purchased but didn't. Like the clinical findings for a given patient, the sales receipt is a compact representation of inherently sparse data.
The "entity" is the sale/transaction id — a foreign key into a sales transactions table. This is used to tag each line item internally, though on the receipt the information about the Sale appears at the top (shop location, sale date/time) and at the bottom (total value of sale).
The "attribute" is a foreign key into a products table, from where one looks up description, unit price, discounts and promotions, etc. (Products are just as volatile as clinical findings, possibly even more so: new products are introduced every month, while others are taken off the market if consumer acceptance is poor. No competent database designer would hard-code individual products such as Doritos or Diet Coke as columns in a table.)
The "values" are the quantity purchased and total line item price.
Row modeling, where facts about something (in this case, a sales transaction) are recorded as multiple rows rather than multiple columns, is a standard data modeling technique. The differences between row modeling and EAV (which may be considered a generalization of row-modeling) are:
A row-modeled table is homogeneous in the facts that it describes: a Line Items table describes only products sold. By contrast, an EAV table contains almost any type of fact.
The data type of the value column/s in a row-modeled table is pre-determined by the nature of the facts it records. By contrast, in an EAV table, the conceptual data type of a value in a particular row depends on the attribute in that row. It follows that in production systems, allowing direct data entry into an EAV table would be a recipe for disaster, because the database engine itself would not be able to perform robust input validation. We shall see later how it is possible to build generic frameworks that perform most of the tasks of input validation, without endless coding on an attribute-by-attribute basis.
In a clinical data repository, row modeling also finds numerous uses; the laboratory test subschema is typically modeled this way, because lab test results are typically numeric, or can be encoded numerically.
The circumstances where you would need to go beyond standard row-modeling to EAV are listed below:
The data type of individual attributes varies (as seen with clinical findings).
The categories of data are numerous, growing or fluctuating, but the number of instances (records/rows) within each category is very small. Here, with conventional modeling, the database’s entity–relationship diagram might have hundreds of tables: the tables that contain thousands/ millions of rows/instances are emphasized visually to the same extent as those with very few rows. The latter are candidates for conversion to an EAV representation. This situation arises in ontology-modeling environments, where categories ("classes") must often be created on the fly, and some classes are often eliminated in subsequent cycles of prototyping.
Certain ("hybrid") classes have some attributes that are non-sparse (present in all or most instances), while other attributes are highly variable and sparse. The latter are suitable for EAV modeling. For example, descriptions of products made by a conglomerate corporation depend on the product category, e.g., the attributes necessary to describe a brand of light bulb are quite different from those required to describe a medical imaging device, but both have common attributes such as packaging unit and per-item cost.
=== Description of concepts ===
==== The entity ====
In clinical data, the entity is typically a clinical event, as described above. In more general-purpose settings, the entity is a foreign key into an "objects" table that records common information about every "object" (thing) in the database – at the minimum, a preferred name and brief description, as well as the category/class of entity to which it belongs. Every record (object) in this table is assigned a machine-generated object ID.
The "objects table" approach was pioneered by Tom Slezak and colleagues at Lawrence Livermore Laboratories for the Chromosome 19 database, and is now standard in most large bioinformatics databases. The use of an objects table does not mandate the concurrent use of an EAV design: conventional tables can be used to store the category-specific details of each object.
The major benefit to a central objects table is that, by having a supporting table of object synonyms and keywords, one can provide a standard Google-like search mechanism across the entire system where the user can find information about any object of interest without having to first specify the category that it belongs to. (This is important in bioscience systems where a keyword like "acetylcholine" could refer either to the molecule itself, which is a neurotransmitter, or the biological receptor to which it binds.)
==== The attribute ====
In the EAV table itself, this is just an attribute ID, a foreign key into an Attribute Definitions table, as stated above. However, there are usually multiple metadata tables that contain attribute-related information, and these are discussed shortly.
==== The value ====
Coercing all values into strings, as in the EAV data example above, results in a simple, but non-scalable, structure: constant data type inter-conversions are required if one wants to do anything with the values, and an index on the value column of an EAV table is essentially useless. Also, it is not convenient to store large binary data, such as images, in Base64 encoded form in the same table as small integers or strings. Therefore, larger systems use separate EAV tables for each data type (including binary large objects, "BLOBS"), with the metadata for a given attribute identifying the EAV table in which its data will be stored. This approach is actually quite efficient because the modest amount of attribute metadata for a given class or form that a user chooses to work with can be cached readily in memory. However, it requires moving of data from one table to another if an attribute’s data type is changed.
== History ==
EAV, as a general-purpose means of knowledge representation, originated with the concept of "association lists" (attribute–value pairs). Commonly used today, these were first introduced in the language LISP.
Attribute–value pairs are widely used for diverse applications, such as configuration files (using a simple syntax like attribute = value). An example of non-database use of EAV is in UIMA (Unstructured Information Management Architecture), a standard now managed by the Apache Foundation and employed in areas such as natural language processing. Software that analyzes text typically marks up ("annotates") a segment: the example provided in the UIMA tutorial is a program that performs named-entity recognition (NER) on a document, annotating the text segment "President Bush" with the annotation–attribute–value triple (Person, Full_Name, "George W. Bush"). Such annotations may be stored in a database table.
While EAV does not have a direct connection to AV-pairs, Stead and Hammond appear to be the first to have conceived of their use for persistent storage of arbitrarily complex data.
The first medical record systems to employ EAV were the Regenstrief electronic medical record (the effort led by Clement MacDonald), William Stead and Ed Hammond's TMR (The Medical Record) system and the HELP Clinical Data Repository (CDR) created by Homer Warner's group at LDS Hospital, Salt Lake City, Utah. (The Regenstrief system actually used a Patient-Attribute-Timestamp-Value design: the use of the timestamp supported retrieval of values for a given patient/attribute in chronological order.) All these systems, developed in the 1970s, were released before commercial systems based on E.F. Codd's relational database model were available, though HELP was much later ported to a relational architecture and commercialized by the 3M corporation. (Note that while Codd's landmark paper was published in 1970, its heavily mathematical tone had the unfortunate effect of diminishing its accessibility among non-computer-science types and consequently delaying the model's acceptance in IT and software-vendor circles. The value of the subsequent contribution of Christopher J. Date, Codd's colleague at IBM, in translating these ideas into accessible language, accompanied by simple examples that illustrated their power, cannot be overstated.)
A group at the Columbia-Presbyterian Medical Center was the first to use a relational database engine as the foundation of an EAV system.
The open-source TrialDB clinical study data management system of Nadkarni et al. was the first to use multiple EAV tables, one for each DBMS data type.
The EAV/CR framework, designed primarily by Luis Marenco and Prakash Nadkarni, overlaid the principles of object orientation onto EAV; it built on Tom Slezak's object table approach (described earlier in the "Entity" section). SenseLab, a publicly accessible neuroscience database, is built with the EAV/CR framework.
== Use in databases ==
The term "EAV database" refers to a database design where a significant proportion of the data is modeled as EAV. However, even in a database described as "EAV-based", some tables in the system are traditional relational tables.
As noted above, EAV modeling makes sense for categories of data, such as clinical findings, where attributes are numerous and sparse. Where these conditions do not hold, standard relational modeling (i.e., one column per attribute) is preferable; using EAV does not mean abandoning common sense or principles of good relational design. In clinical record systems, the subschemas dealing with patient demographics and billing are typically modeled conventionally. (While most vendor database schemas are proprietary, VistA, the system used throughout the United States Department of Veterans Affairs (VA) medical system, known as the Veterans Health Administration (VHA), is open-source and its schema is readily inspectable, though it uses a MUMPS database engine rather than a relational database.)
As discussed shortly, an EAV database is essentially unmaintainable without numerous supporting tables that contain supporting metadata. The metadata tables, which typically outnumber the EAV tables by a factor of at least three or more, are typically standard relational tables. An example of a metadata table is the Attribute Definitions table mentioned above.
== EAV/CR: representing substructure with classes and relationships ==
In a simple EAV design, the values of an attribute are simple or primitive data types as far as the database engine is concerned. However, in EAV systems used for the representation of highly diverse data, it is possible that a given object (class instance) may have substructure: that is, some of its attributes may represent other kinds of objects, which in turn may have substructure, to an arbitrary level of complexity. A car, for example, has an engine, a transmission, etc., and the engine has components such as cylinders. (The permissible substructure for a given class is defined within the system's attribute metadata, as discussed later. Thus, for example, the attribute "random-access-memory" could apply to the class "computer" but not to the class "engine".)
To represent substructure, one incorporates a special EAV table where the value column contains references to other entities in the system (i.e., foreign key values into the objects table). To get all the information on a given object requires a recursive traversal of the metadata, followed by a recursive traversal of the data that stops when every attribute retrieved is simple (atomic). Recursive traversal is necessary whether details of an individual class are represented in conventional or EAV form; such traversal is performed in standard object–relational systems, for example. In practice, the number of levels of recursion tends to be relatively modest for most classes, so the performance penalties due to recursion are modest, especially with indexing of object IDs.
EAV/CR (EAV with Classes and Relationships) refers to a framework that supports complex substructure. Its name is somewhat of a misnomer: while it was an outshoot of work on EAV systems, in practice, many or even most of the classes in such a system may be represented in standard relational form, based on whether the attributes are sparse or dense. EAV/CR is really characterized by its very detailed metadata, which is rich enough to support the automatic generation of browsing interfaces to individual classes without having to write class-by-class user-interface code. The basis of such browser interfaces is that it is possible to generate a batch of dynamic SQL queries that is independent of the class of the object, by first consulting its metadata and using metadata information to generate a sequence of queries against the data tables, and some of these queries may be arbitrarily recursive. This approach works well for object-at-a-time queries, as in Web-based browsing interfaces where clicking on the name of an object brings up all details of the object in a separate page: the metadata associated with that object's class also facilitates the presentation of the object's details, because it includes captions of individual attributes, the order in which they are to be presented as well as how they are to be grouped.
One approach to EAV/CR is to allow columns to hold JSON structures, which thus provide the needed class structure. For example, PostgreSQL, as of version 9.4, offers JSON binary column (JSONB) support, allowing JSON attributes to be queried, indexed and joined.
== Metadata ==
In the words of Prof. Dr. Daniel Masys (formerly Chair of Vanderbilt University's Medical Informatics Department), the challenges of working with EAV stem from the fact that in an EAV database, the "physical schema" (the way data are stored) is radically different from the "logical schema" – the way users, and many software applications such as statistics packages, regard it, i.e., as conventional rows and columns for individual classes. (Because an EAV table conceptually mixes apples, oranges, grapefruit and chop suey, if you want to do any analysis of the data using standard off-the-shelf software, in most cases you have to convert subsets of it into columnar form. The process of doing this, called pivoting, is important enough to be discussed separately.)
Metadata helps perform the sleight of hand that lets users interact with the system in terms of the logical schema rather than the physical: the software continually consults the metadata for various operations such as data presentation, interactive validation, bulk data extraction and ad hoc query. The metadata can actually be used to customize the behavior of the system.
EAV systems trade off simplicity in the physical and logical structure of the data for complexity in their metadata, which, among other things, plays the role that database constraints and referential integrity do in standard database designs. Such a tradeoff is generally worthwhile, because in the typical mixed schema of production systems, the data in conventional relational tables can also benefit from functionality such as automatic interface generation. The structure of the metadata is complex enough that it comprises its own subschema within the database: various foreign keys in the data tables refer to tables within this subschema. This subschema is standard-relational, with features such as constraints and referential integrity being used to the hilt.
The correctness of the metadata contents, in terms of the intended system behavior, is critical and the task of ensuring correctness means that, when creating an EAV system, considerable design efforts must go into building user interfaces for metadata editing that can be used by people on the team who know the problem domain (e.g., clinical medicine) but are not necessarily programmers. (Historically, one of the main reasons why the pre-relational TMR system failed to be adopted at sites other than its home institution was that all metadata was stored in a single file with a non-intuitive structure. Customizing system behavior by altering the contents of this file, without causing the system to break, was such a delicate task that the system's authors only trusted themselves to do it.)
Where an EAV system is implemented through RDF, the RDF Schema language may conveniently be used to express such metadata. This Schema information may then be used by the EAV database engine to dynamically re-organize its internal table structure for best efficiency.
Some final caveats regarding metadata:
Because the business logic is in the metadata rather than explicit in the database schema (i.e., one level removed, compared with traditionally designed systems), it is less apparent to one who is unfamiliar with the system. Metadata-browsing and metadata-reporting tools are therefore important in ensuring the maintainability of an EAV system. In the common scenario where metadata is implemented as a relational sub-schema, these tools are nothing more than applications built using off-the-shelf reporting or querying tools that operate on the metadata tables.
It is easy for an insufficiently knowledgeable user to corrupt (i.e., introduce inconsistencies and errors in) metadata. Therefore, access to metadata must be restricted, and an audit trail of accesses and changes put into place to deal with situations where multiple individuals have metadata access. Using an RDBMS for metadata will simplify the process of maintaining consistency during metadata creation and editing, by leveraging RDBMS features such as support for transactions. Also, if the metadata is part of the same database as the data itself, this ensures that it will be backed up at least as frequently as the data itself, so that it can be recovered to a point in time.
The quality of the annotation and documentation within the metadata (i.e., the narrative/explanatory text in the descriptive columns of the metadata sub-schema) must be much higher, in order to facilitate understanding by various members of the development team. Ensuring metadata quality (and keeping it current as the system evolves) takes very high priority in the long-term management and maintenance of any design that uses an EAV component. Poorly-documented or out-of-date metadata can compromise the system's long-term viability.
=== Information captured in metadata ===
==== Attribute metadata ====
Validation metadata include data type, range of permissible values or membership in a set of values, regular expression match, default value, and whether the value is permitted to be null. In EAV systems representing classes with substructure, the validation metadata will also record what class, if any, a given attribute belongs to.
Presentation metadata: how the attribute is to be displayed to the user (e.g., as a text box or image of specified dimensions, a pull-down list or a set of radio buttons). When a compound object is composed of multiple attributes, as in the EAV/CR design, there is additional metadata on the order in which the attributes should be presented, and how these attributes should optionally be grouped (under descriptive headings).
For attributes which happen to be laboratory parameters, ranges of normal values, which may vary by age, sex, physiological state and assay method, are recorded.
Grouping metadata: Attributes are typically presented as part of a higher-order group, e.g., a specialty-specific form. Grouping metadata includes information such as the order in which attributes are presented. Certain presentation metadata, such as fonts/colors and the number of attributes displayed per row, apply to the group as a whole.
==== Advanced validation metadata ====
Dependency metadata: in many user interfaces, entry of specific values into certain fields/attributes is required to either disable/hide certain other fields or enable/show other fields. (For example, if a user chooses the response "No" to a Boolean question "Does the patient have diabetes?", then subsequent questions about the duration of diabetes, medications for diabetes, etc. must be disabled.) To effect this in a generic framework involves storing of dependencies between the controlling attributes and the controlled attributes.
Computations and complex validation: As in a spreadsheet, the value of certain attributes can be computed, and displayed, based on values entered into fields that are presented earlier in sequence. (For example, body surface area is a function of height and width). Similarly, there may be "constraints" that must be true for the data to be valid: for example, in a differential white cell count, the sum of the counts of the individual white cell types must always equal 100, because the individual counts represent percentages. Computed formulas and complex validation are generally effected by storing expressions in the metadata that are macro-substituted with the values that the user enters and can be evaluated. In Web browsers, both JavaScript and VBScript have an Eval() function that can be leveraged for this purpose.
Validation, presentation and grouping metadata make possible the creation of code frameworks that support automatic user interface generation for both data browsing as well as interactive editing. In a production system that is delivered over the Web, the task of validation of EAV data is essentially moved from the back-end/database tier (which is powerless with respect to this task) to the middle /Web server tier. While back-end validation is always ideal, because it is impossible to subvert by attempting direct data entry into a table, middle tier validation through a generic framework is quite workable, though a significant amount of software design effort must go into building the framework first. The availability of open-source frameworks that can be studied and modified for individual needs can go a long way in avoiding wheel reinvention.
== Usage scenarios ==
(The first part of this section is a précis of the Dinu/Nadkarni reference article in Central, to which the reader is directed for more details.)
EAV modeling, under the alternative terms "generic data modeling" or "open schema", has long been a standard tool for advanced data modelers. Like any advanced technique, it can be double-edged, and should be used judiciously.
Also, the employment of EAV does not preclude the employment of traditional relational database modeling approaches within the same database schema. In EMRs that rely on an RDBMS, such as Cerner, which use an EAV approach for their clinical-data subschema, the vast majority of tables in the schema are in fact traditionally modeled, with attributes represented as individual columns rather than as rows.
The modeling of the metadata subschema of an EAV system, in fact, is a very good fit for traditional modeling, because of the inter-relationships between the various components of the metadata. In the TrialDB system, for example, the number of metadata tables in the schema outnumber the data tables by about ten to one. Because the correctness and consistency of metadata is critical to the correct operation of an EAV system, the system designer wants to take full advantage of all of the features that RDBMSs provide, such as referential integrity and programmable constraints, rather than having to reinvent the RDBMS-engine wheel. Consequently, the numerous metadata tables that support EAV designs are typically in third-normal relational form.
Commercial electronic health record Systems (EHRs) use row-modeling for classes of data such as diagnoses, surgical procedures performed on and laboratory test results, which are segregated into separate tables. In each table, the "entity" is a composite of the patient ID and the date/time the diagnosis was made (or the surgery or lab test performed); the attribute is a foreign key into a specially designated lookup table that contains a controlled vocabulary - e.g., ICD-10 for diagnoses, Current Procedural Terminology for surgical procedures, with a set of value attributes. (E.g., for laboratory-test results, one may record the value measured, whether it is in the normal, low or high range, the ID of the person responsible for performing the test, the date/time the test was performed, and so on.) As stated earlier, this is not a full-fledged EAV approach because the domain of attributes for a given table is restricted, just as the domain of product IDs in a supermarket's Sales table would be restricted to the domain of Products in a Products table.
However, to capture data on parameters that are not always defined in standard vocabularies, EHRs also provide a "pure" EAV mechanism, where specially designated power-users can define new attributes, their data type, maximum and minimal permissible values (or permissible set of values/codes), and then allow others to capture data based on these attributes. In the Epic (TM) EHR, this mechanism is termed "Flowsheets", and is commonly used to capture inpatient nursing observation data.
=== Modeling sparse attributes ===
The typical case for using the EAV model is for highly sparse, heterogeneous attributes, such as clinical parameters in the electronic medical record (EMRs), as stated above. Even here, however, it is accurate to state that the EAV modeling principle is applied to a sub-schema of the database rather than for all of its contents. (Patient demographics, for example, are most naturally modeled in one-column-per-attribute, traditional relational structure.)
Consequently, the arguments about EAV vs. "relational" design reflect incomplete understanding of the problem: An EAV design should be employed only for that sub-schema of a database where sparse attributes need to be modeled: even here, they need to be supported by third normal form metadata tables. There are relatively few database-design problems where sparse attributes are encountered: this is why the circumstances where EAV design is applicable are relatively rare. Even where they are encountered, a set of EAV tables is not the only way to address sparse data: an XML-based solution (discussed below) is applicable when the maximum number of attributes per entity is relatively modest, and the total volume of sparse data is also similarly modest. An example of this situation is the problems of capturing variable attributes for different product types.
Sparse attributes may also occur in E-commerce situations where an organization is purchasing or selling a vast and highly diverse set of commodities, with the details of individual categories of commodities being highly variable.
=== Modeling numerous classes with very few instances per class: highly dynamic schemas ===
Another application of EAV is in modeling classes and attributes that, while not sparse, are dynamic, but where the number of data rows per class will be relatively modest – a couple of hundred rows at most, but typically a few dozen – and the system developer is also required to provide a Web-based end-user interface within a very short turnaround time. "Dynamic" means that new classes and attributes need to be continually defined and altered to represent an evolving data model. This scenario can occur in rapidly evolving scientific fields as well as in ontology development, especially during the prototyping and iterative refinement phases.
While the creation of new tables and columns to represent a new category of data is not especially labor-intensive, the programming of Web-based interfaces that support browsing or basic editing with type- and range-based validation is. In such a case, a more maintainable long-term solution is to create a framework where the class and attribute definitions are stored in metadata, and the software generates a basic user interface from this metadata dynamically.
The EAV/CR framework, mentioned earlier, was created to address this very situation. Note that an EAV data model is not essential here, but the system designer may consider it an acceptable alternative to creating, say, sixty or more tables containing a total of not more than two thousand rows. Here, because the number of rows per class is so few, efficiency considerations are less important; with the standard indexing by class ID/attribute ID, DBMS optimizers can easily cache the data for a small class in memory when running a query involving that class or attribute.
In the dynamic-attribute scenario, it is worth noting that Resource Description Framework (RDF) is being employed as the underpinning of Semantic-Web-related ontology work. RDF, intended to be a general method of representing information, is a form of EAV: an RDF triple comprises an object, a property, and a value.
At the end of Jon Bentley's book "Writing Efficient Programs", the author warns that making code more efficient generally also makes it harder to understand and maintain, and so one does not rush in and tweak code unless one has first determined that there is a performance problem, and measures such as code profiling have pinpointed the exact location of the bottleneck. Once you have done so, you modify only the specific code that needs to run faster. Similar considerations apply to EAV modeling: you apply it only to the sub-system where traditional relational modeling is known a priori to be unwieldy (as in the clinical data domain), or is discovered, during system evolution, to pose significant maintenance challenges. Database Guru (and currently a vice-president of Core Technologies at Oracle Corporation) Tom Kyte, for example, correctly points out drawbacks of employing EAV in traditional business scenarios, and makes the point that mere "flexibility" is not a sufficient criterion for employing EAV. (However, he makes the sweeping claim that EAV should be avoided in all circumstances, even though Oracle's Health Sciences division itself employs EAV to model clinical-data attributes in its commercial systems ClinTrial and Oracle Clinical.)
=== Working with EAV data ===
The Achilles heel of EAV is the difficulty of working with large volumes of EAV data. It is often necessary to transiently or permanently inter-convert between columnar and row-or EAV-modeled representations of the same data; this can be both error-prone if done manually as well as CPU-intensive. Generic frameworks that utilize attribute and attribute-grouping metadata address the former but not the latter limitation; their use is more or less mandated in the case of mixed schemas that contain a mixture of conventional-relational and EAV data, where the error quotient can be very significant.
The conversion operation is called pivoting. Pivoting is not required only for EAV data but also for any form of row-modeled data. (For example, implementations of the Apriori algorithm for Association Analysis, widely used to process supermarket sales data to identify other products that purchasers of a given product are also likely to buy, pivot row-modeled data as a first step.) Many database engines have proprietary SQL extensions to facilitate pivoting, and packages such as Microsoft Excel also support it. The circumstances where pivoting is necessary are considered below.
Browsing of modest amounts of data for an individual entity, optionally followed by data editing based on inter-attribute dependencies. This operation is facilitated by caching the modest amounts of the requisite supporting metadata. Some programs, such as TrialDB, access the metadata to generate semi-static Web pages that contain embedded programming code as well as data structures holding metadata.
Bulk extraction transforms large (but predictable) amounts of data (e.g., a clinical study’s complete data) into a set of relational tables. While CPU-intensive, this task is infrequent and does not need to be done in real-time; i.e., the user can wait for a batched process to complete. The importance of bulk extraction cannot be overestimated, especially when the data is to be processed or analyzed with standard third-party tools that are completely unaware of EAV structure. Here, it is not advisable to try to reinvent entire sets of wheels through a generic framework, and it is best just to bulk-extract EAV data into relational tables and then work with it using standard tools.
Ad hoc query interfaces to row- or EAV-modeled data, when queried from the perspective of individual attributes, (e.g., "retrieve all patients with the presence of liver disease, with signs of liver failure and no history of alcohol abuse") must typically show the results of the query with individual attributes as separate columns. For most EAV database scenarios ad hoc query performance must be tolerable, but sub-second responses are not necessary, since the queries tend to be exploratory in nature.
==== Relational division ====
However, the structure of EAV data model is a perfect candidate for Relational Division, see relational algebra. With a good indexing strategy it's possible to get a response time in less than a few hundred milliseconds on a billion row EAV table. Microsoft SQL Server MVP Peter Larsson has proved this on a laptop and made the solution general available.
==== Optimizing pivoting performance ====
One possible optimization is the use of a separate "warehouse" or queryable schema whose contents are refreshed in batch mode from the production (transaction) schema. See data warehousing. The tables in the warehouse are heavily indexed and optimized using denormalization, which combines multiple tables into one to minimize performance penalty due to table joins.
Certain EAV data in a warehouse may be converted into standard tables using "materialized views" (see data warehouse), but this is generally a last resort that must be used carefully, because the number of views of this kind tends to grow non-linearly with the number of attributes in a system.
In-memory data structures: One can use hash tables and two-dimensional arrays in memory in conjunction with attribute-grouping metadata to pivot data, one group at a time. This data is written to disk as a flat delimited file, with the internal names for each attribute in the first row: this format can be readily bulk-imported into a relational table. This "in-memory" technique significantly outperforms alternative approaches by keeping the queries on EAV tables as simple as possible and minimizing the number of I/O operations. Each statement retrieves a large amount of data, and the hash tables help carry out the pivoting operation, which involves placing a value for a given attribute instance into the appropriate row and column. Random Access Memory (RAM) is sufficiently abundant and affordable in modern hardware that the complete data set for a single attribute group in even large data sets will usually fit completely into memory, though the algorithm can be made smarter by working on slices of the data if this turns out not to be the case.
Obviously, no matter what approaches you take, querying EAV will not be as fast as querying standard column-modeled relational data for certain types of query, in much the same way that access of elements in sparse matrices are not as fast as those on non-sparse matrices if the latter fit entirely into main memory. (Sparse matrices, represented using structures such as linked lists, require list traversal to access an element at a given X-Y position, while access to elements in matrices represented as 2-D arrays can be performed using fast CPU register operations.) If, however, you chose the EAV approach correctly for the problem that you were trying to solve, this is the price that you pay; in this respect, EAV modeling is an example of a space (and schema maintenance) versus CPU-time tradeoff.
== Alternatives ==
=== EAV vs. the Universal Data Model ===
Originally postulated by Maier, Ullman and Vardi, the "Universal Data Model" (UDM) seeks to simplify the query of a complex relational schema by naive users, by creating the illusion that everything is stored in a single giant "universal table". It does this by utilizing inter-table relationships, so that the user does not need to be concerned about what table contains what attribute. C.J. Date, however, pointed out that in circumstances where a table is multiply related to another (as in genealogy databases, where an individual's father and mother are also individuals, or in some business databases where all addresses are stored centrally, and an organization can have different office addresses and shipping addresses), there is insufficient metadata within the database schema to specify unambiguous joins. When UDM has been commercialized, as in SAP BusinessObjects, this limitation is worked around through the creation of "Universes", which are relational views with predefined joins between sets of tables: the "Universe" developer disambiguates ambiguous joins by including the multiply-related table in a view multiple times using different aliases.
Apart from the way in which data is explicitly modeled (UDM simply uses relational views to intercede between the user and the database schema), EAV differs from Universal Data Models in that it also applies to transactional systems, not only query oriented (read-only) systems as in UDM. Also, when used as the basis for clinical-data query systems, EAV implementations do not necessarily shield the user from having to specify the class of an object of interest. In the EAV-based i2b2 clinical data mart, for example, when the user searches for a term, she has the option of specifying the category of data that the user is interested in. For example, the phrase "lithium" can refer either to the medication (which is used to treat bipolar disorder), or a laboratory assay for lithium level in the patient's blood. (The blood level of lithium must be monitored carefully: too much of the drug causes severe side effects, while too little is ineffective.)
=== XML and JSON ===
An Open Schema implementation can use an XML column in a table to capture the variable/sparse information. Similar ideas can be applied to databases that support JSON-valued columns: sparse, hierarchical data can be represented as JSON. If the database has JSON support, such as PostgreSQL and (partially) SQL Server 2016 and later, then attributes can be queried, indexed and joined. This can offer performance improvements of over 1000x over naive EAV implementations., but does not necessarily make the overall database application more robust.
Note that there are two ways in which XML or JSON data can be stored: one way is to store it as a plain string, opaque to the database server; the other way is to use a database server that can "see into" the structure. There are obviously some severe drawbacks to storing opaque strings: these cannot be queried directly, one cannot form an index based on their contents, and it is impossible to perform joins based on the content.
Building an application that has to manage data gets extremely complicated when using EAV models, because of the extent of infrastructure that has to be developed in terms of metadata tables and application-framework code. Using XML solves the problem of server-based data validation (which must be done by middle-tier and browser-based code in EAV-based frameworks), but has the following drawbacks:
It is programmer-intensive. XML schemas are notoriously tricky to write by hand, a recommended approach is to create them by defining relational tables, generating XML-schema code, and then dropping these tables. This is problematic in many production operations involving dynamic schemas, where new attributes are required to be defined by power-users who understand a specific application domain (e.g. inventory management or biomedicine) but are not necessarily programmers. By contrast, in production systems that use EAV, such users define new attributes (and the data-type and validation checks associated with each) through a GUI application. Because the validation-associated metadata is required to be stored in multiple relational tables in a normalized design, a GUI application that ties these tables together and enforces the appropriate metadata-consistency checks is the only practical way to allow entry of attribute information, even for advanced developers - even if the end-result uses XML or JSON instead of separate relational tables.
The server-based diagnostics that result with an XML/JSON solution if incorrect data is attempted to be inserted (e.g., range check or regular-expression pattern violations) are cryptic to the end-user: to convey the error accurately, one would, at the least, need to associate a detailed and user-friendly error diagnostic with each attribute.
The solution does not address the user-interface-generation problem.
All of the above drawbacks are remediable by creating a layer of metadata and application code, but in creating this, the original "advantage" of not having to create a framework has vanished. The fact is that modeling sparse data attributes robustly is a hard database-application-design problem no matter which storage approach is used. Sarka's work, however, proves the viability of using an XML field instead of type-specific relational EAV tables for the data-storage layer, and in situations where the number of attributes per entity is modest (e.g., variable product attributes for different product types) the XML-based solution is more compact than an EAV-table-based one. (XML itself may be regarded as a means of attribute–value data representation, though it is based on structured text rather than on relational tables.)
=== Tree structures and relational databases ===
There exist several other approaches for the representation of tree-structured data, be it XML, JSON or other formats, such as the nested set model, in a relational database. On the other hand, database vendors have begun to include JSON and XML support into their data structures and query features, like in IBM Db2, where XML data is stored as XML separate from the tables, using XPath queries as part of SQL statements, or in PostgreSQL, with a JSON data type that can be indexed and queried. These developments accomplish, improve or substitute the EAV model approach.
The uses of JSON and XML are not necessarily the same as the use of an EAV model, though they can overlap. XML is preferable to EAV for arbitrarily hierarchical data that is relatively modest in volume for a single entity: it is not intended to scale up to the multi-gigabyte level with respect to data-manipulation performance. XML is not concerned per-se with the sparse-attribute problem, and when the data model underlying the information to be represented can be decomposed straightforwardly into a relational structure, XML is better suited as a means of data interchange than as a primary storage mechanism. EAV, as stated earlier, is specifically (and only) applicable to the sparse-attribute scenario. When such a scenario holds, the use of datatype-specific attribute–value tables that can be indexed by entity, by attribute, and by value and manipulated through simple SQL statements is vastly more scalable than the use of an XML tree structure. The Google App Engine, mentioned above, uses strongly-typed-value tables for a good reason.
=== Graph databases ===
An alternative approach to managing the various problems encountered with EAV-structured data is to employ a graph database. These represent entities as the nodes of a graph or hypergraph, and attributes as links or edges of that graph. The issue of table joins are addressed by providing graph-specific query languages, such as Apache TinkerPop, or the OpenCog atomspace pattern matcher.
Another alternative is to use SPARQL store.
== Considerations for server software ==
=== PostgreSQL: JSONB columns ===
PostgreSQL version 9.4 includes support for JSON binary columns (JSONB), which can be queried, indexed and joined. This allows performance improvements by factors of a thousand or more over traditional EAV table designs.
A DB schema based on JSONB always has fewer tables: one may nest attribute–value pairs in JSONB type fields of the Entity table. That makes the DB schema easy to comprehend and SQL queries concise.
The programming code to manipulate the database objects on the abstraction layer turns out much shorter.
=== SQL Server 2008 and later: sparse columns ===
Microsoft SQL Server 2008 offers a (proprietary) alternative to EAV. Columns with an atomic data type (e.g., numeric, varchar or datetime columns) can be designated as sparse simply by including the word SPARSE in the column definition of the CREATE TABLE statement. Sparse columns optimize the storage of NULL values (which now take up no space at all) and are useful when the majority records in a table will have NULL values for that column. Indexes on sparse columns are also optimized: only those rows with values are indexed. In addition, the contents of all sparse columns in a particular row of a table can be collectively aggregated into a single XML column (a column set), whose contents are of the form [<column-name>column contents </column-name>]*.... In fact, if a column set is defined for a table as part of a CREATE TABLE statement, all sparse columns subsequently defined are typically added to it. This has the interesting consequence that the SQL statement SELECT * from <tablename> will not return the individual sparse columns, but concatenate all of them into a single XML column whose name is that of the column set (which therefore acts as a virtual, computed column). Sparse columns are convenient for business applications such as product information, where the applicable attributes can be highly variable depending on the product type, but where the total number of variable attributes per product type are relatively modest.
==== Limitations of sparse attributes ====
However, this approach to modelling sparse attributes has several limitations: rival DBMSs have, notably, chosen not to borrow this idea for their own engines. Limitations include:
The maximum number of sparse columns in a table is 10,000, which may fall short for some implementations, such as for storing clinical data, where the possible number of attributes is one order of magnitude larger. Therefore, this is not a solution for modelling *all* possible clinical attributes for a patient.
Addition of new attributes – one of the primary reasons an EAV model might be sought – still requires a DBA. Further, the problem of building a user interface to sparse attribute data is not addressed: only the storage mechanism is streamlined.
Applications can be written to dynamically add and remove sparse columns from a table at run-time: in contrast, an attempt to perform such an action in a multi-user scenario where other users/processes are still using the table would be prevented for tables without sparse columns. However, while this capability offers power and flexibility, it invites abuse, and should be used judiciously and infrequently.
It can result in significant performance penalties, in part because any compiled query plans that use this table are automatically invalidated.
Dynamic column addition or removal is an operation that should be audited, because column removal can cause data loss: allowing an application to modify a table without maintaining some kind of a trail, including a justification for the action, is not good software practice.
SQL constraints (e.g., range checks, regular expression checks) cannot be applied to sparse columns. The only check that is applied is for correct data type. Constraints would have to be implemented in metadata tables and middle-tier code, as is done in production EAV systems. (This consideration also applies to business applications as well.)
SQL Server has limitations on row size if attempting to change the storage format of a column: the total contents of all atomic-datatype columns, sparse and non-sparse, in a row that contain data cannot exceed 8016 bytes if that table contains a sparse column for the data to be automatically copied over.
Sparse columns that happen to contain data have a storage overhead of 4 bytes per column in addition to storage for the data type itself (e.g., 4 bytes for datetime columns). This impacts the amount of sparse-column data that you can associate with a given row. This size restriction is relaxed for the varchar data type, which means that, if one hits row-size limits in a production system, one has to work around it by designating sparse columns as varchar even though they may have a different intrinsic data type. Unfortunately, this approach now subverts server-side data-type checking.
== Cloud computing offerings ==
Many cloud computing vendors offer data stores based on the EAV model, where an arbitrary number of attributes can be associated with a given entity. Roger Jennings provides an in-depth comparison of these. In Amazon's offering, SimpleDB, the data type is limited to strings, and data that is intrinsically non-string must be coerced to string (e.g., numbers must be padded with leading zeros) if you wish to perform operations such as sorting. Microsoft's offering, Windows Azure Table Storage, offers a limited set of data types: byte[], bool, DateTime, double, Guid, int, long and string [1]. The Google App Engine [2] offers the greatest variety of data types: in addition to dividing numeric data into int, long, or float, it also defines custom data types such as phone number, E-mail address, geocode and hyperlink. Google, but not Amazon or Microsoft, lets you define metadata that would prevent invalid attributes from being associated with a particular class of entity, by letting you create a metadata model.
Google lets you operate on the data using a subset of SQL; Microsoft offer a URL-based querying syntax that is abstracted via a LINQ provider; Amazon offer a more limited syntax. Of concern, built-in support for combining different entities through joins is currently (April '10) non-existent with all three engines. Such operations have to be performed by application code. This may not be a concern if the application servers are co-located with the data servers at the vendor's data center, but a lot of network traffic would be generated if the two were geographically separated.
An EAV approach is justified only when the attributes that are being modeled are numerous and sparse: if the data being captured does not meet this requirement, the cloud vendors' default EAV approach is often a mismatch for applications that require a true back-end database (as opposed to merely a means of persistent data storage). Retrofitting the vast majority of existing database applications, which use a traditional data-modeling approach, to an EAV-type cloud architecture, would require major surgery. Microsoft discovered, for example, that its database-application-developer base was largely reluctant to invest such effort. In 2010 therefore, Microsoft launched a premium offering, SQL Server Azure, a cloud-accessible, fully-fledged relational engine which allows porting of existing database applications with only modest changes. As of the early 2020s, the service allows standard-tier physical database sizes of up to 8TB, with "hyperscale" and "business-critical" offerings also available.
== See also ==
Attribute–value system – Knowledge representation framework
Linked data – Structured data and method for its publication
Resource Description Framework – Formal language for describing data models (RDF)
Semantic triple – Data modeling construct
Semantic Web – Extension of the Web to facilitate data exchange
Slowly changing dimension – Structure in data warehousing
Triplestore – Database for storage and retrieval of triples
== References == | Wikipedia/Entity–attribute–value_model |
Within data modelling, cardinality is the numerical relationship between rows of one table and rows in another. Common cardinalities include one-to-one, one-to-many, and many-to-many. Cardinality can be used to define data models as well as analyze entities within datasets.
== Relationships ==
For example, consider a database of electronic health records. Such a database could contain tables like the following:
A doctor table with information about physicians.
A patient table for medical subjects undergoing treatment.
An appointment table with an entry for each hospital visit.
Natural relationships exist between these entities:
A many-to-many relationship between records in doctor and records in patient because doctors have many patients and patients can see many doctors.
A one-to-many relationship between records in patient and records in appointment because patients can have many appointments and each appointment involves only one patient.
A one-to-one relationship is mostly used to split a table in two in order to provide information concisely and make it more understandable. In the hospital example, such a relationship could be used to keep apart doctors' own unique professional information from administrative details.
== Modeling ==
In data modeling, collections of data elements are grouped into "data tables" which contain groups of data field names called "database attributes". Tables are linked by "key fields". A "primary key" assigns a field to its "special order table". For example, the "Doctor Last Name" field might be assigned as a primary key of the Doctor table with all people having same last name organized alphabetically according to the first three letters of their first name. A table can also have a foreign key which indicates that field is linked to the primary key of another table.
== Types of models ==
A complex data model can involve hundreds of related tables. Computer scientist Edgar F. Codd created a systematic method to decompose and organize relational databases. Codd's steps for organizing database tables and their keys is called database normalization, which avoids certain hidden database design errors (delete anomalies or update anomalies). In real life the process of database normalization ends up breaking tables into a larger number of smaller tables.
In the real world, data modeling is critical because as the data grows voluminous, tables linked by keys must be used to speed up programmed retrieval of data. If a data model is poorly crafted, even a computer applications system with just a million records will give the end-users unacceptable response time delays. For this reason, data modeling is a keystone in the skills needed by a modern software developer.
== Database modeling techniques ==
The entity–relationship model proposes a technique that produces entity–relationship diagrams (ERDs), which can be employed to capture information about data model entity types, relationships and cardinality. A Crow's foot shows a one-to-many relationship. Alternatively a single line represents a one-to-one relationship.
== Application program modeling approaches ==
In the object-oriented application programming paradigm, which is related to database structure design, UML class diagrams may be used for object modeling. In that case, object relationships are modeled using UML associations, and multiplicity is used on those associations to denote cardinality. Here are some examples:
== See also ==
Arity
Entity-relationship model
Unified modeling language
== References ==
== External links ==
UML multiplicity as data model cardinality - http://www.agiledata.org
Cardinality in Data Modeling - Adam Alalouf, Temple University
Cardinality on Techopedia
Cardinality on Geeksforgeeks
Database Cardinality on SQL World | Wikipedia/Cardinality_(data_modeling) |
In database theory, the PACELC design principle is an extension to the CAP theorem. It states that in case of network partitioning (P) in a distributed computer system, one has to choose between availability (A) and consistency (C) (as per the CAP theorem), but else (E), even when the system is running normally in the absence of partitions, one has to choose between latency (L) and loss of consistency (C).
== Overview ==
The CAP theorem can be phrased as "PAC", the impossibility theorem that no distributed data store can be both consistent and available in executions that contains partitions. This can be proved by examining latency: if a system ensures consistency, then operation latencies grow with message delays, and hence operations cannot terminate eventually if the network is partitioned, i.e. the system cannot ensure availability.
In the absence of partitions, both consistency and availability can be satisfied. PACELC therefore goes further and examines how the system replicates data. Specifically, in the absence of partitions, an additional trade-off (ELC) exists between latency and consistency. If the store is atomically consistent, then the sum of the read and write delay is at least the message delay. In practice, most systems rely on explicit acknowledgments rather than timed delays to ensure delivery, requiring a full network round trip and therefore message delay on both reads and writes to ensure consistency. In low latency systems, in contrast, consistency is relaxed in order to reduce latency.
There are four configurations or tradeoffs in the PACELC space:
PA/EL - prioritize availability and latency over consistency
PA/EC - when there is a partition, choose availability; else, choose consistency
PC/EL - when there is a partition, choose consistency; else, choose latency
PC/EC - choose consistency at all times
PC/EC and PA/EL provide natural cognitive models for an application developer. A PC/EC system provides a firm guarantee of atomic consistency, as in ACID, while PA/EL provides high availability and low latency with a more complex consistency model. In contrast, PA/EC and PC/EL systems only make conditional guarantees of consistency. The developer still has to write code to handle the cases where the guarantee is not upheld. PA/EC systems are rare outside of the in-memory data grid industry, where systems are localized to geographic regions and the latency vs. consistency tradeoff is not significant. PC/EL is even more tricky to understand. PC does not indicate that the system is fully consistent; rather it indicates that the system does not reduce consistency beyond the baseline consistency level when a network partition occurs—instead, it reduces availability.
Some experts like Marc Brooker argue that the CAP theorem is particularly relevant in intermittently connected environments, such as those related to the Internet of Things (IoT) and mobile applications. In these contexts, devices may become partitioned due to challenging physical conditions, such as power outages or when entering confined spaces like elevators. For distributed systems, such as cloud applications, it is more appropriate to use the PACELC theorem, which is more comprehensive and considers trade-offs such as latency and consistency even in the absence of network partitions.
== History ==
The PACELC theorem was first described by Daniel Abadi from Yale University in 2010 in a blog post, which he later clarified in a paper in 2012. The purpose of PACELC is to address his thesis that "Ignoring the consistency/latency trade-off of replicated systems is a major oversight [in CAP], as it is present at all times during system operation, whereas CAP is only relevant in the arguably rare case of a network partition." The PACELC theorem was proved formally in 2018 in a SIGACT News article.
== Database PACELC ratings ==
Original database PACELC ratings are from. Subsequent updates contributed by wikipedia community.
The default versions of Amazon's early (internal) Dynamo, Cassandra, Riak, and Cosmos DB are PA/EL systems: if a partition occurs, they give up consistency for availability, and under normal operation they give up consistency for lower latency.
Fully ACID systems such as VoltDB/H-Store, Megastore, MySQL Cluster, and PostgreSQL are PC/EC: they refuse to give up consistency, and will pay the availability and latency costs to achieve it. Bigtable and related systems such as HBase are also PC/EC.
Amazon DynamoDB (launched January 2012) is quite different from the early (Amazon internal) Dynamo which was considered for the PACELC paper. DynamoDB follows a strong leader model, where every write is strictly serialized (and conditional writes carry no penalty) and supports read-after-write consistency. This guarantee does not apply to "Global Tables" across regions. The DynamoDB SDKs use eventually consistent reads by default (improved availability and throughput), but when a consistent read is requested the service will return either a current view to the item or an error.
Couchbase provides a range of consistency and availability options during a partition, and equally a range of latency and consistency options with no partition. Unlike most other databases, Couchbase doesn't have a single API set nor does it scale/replicate all data services homogeneously. For writes, Couchbase favors Consistency over Availability making it formally CP, but on read there is more user-controlled variability depending on index replication, desired consistency level and type of access (single document lookup vs range scan vs full-text search, etc.). On top of that, there is then further variability depending on cross-datacenter-replication (XDCR) which takes multiple CP clusters and connects them with asynchronous replication and Couchbase Lite which is an embedded database and creates a fully multi-master (with revision tracking) distributed topology.
Cosmos DB supports five tunable consistency levels that allow for tradeoffs between C/A during P, and L/C during E. Cosmos DB never violates the specified consistency level, so it's formally CP.
MongoDB can be classified as a PA/EC system. In the baseline case, the system guarantees reads and writes to be consistent.
PNUTS is a PC/EL system.
Hazelcast IMDG and indeed most in-memory data grids are an implementation of a PA/EC system; Hazelcast can be configured to be EL rather than EC. Concurrency primitives (Lock, AtomicReference, CountDownLatch, etc.) can be either PC/EC or PA/EC.
FaunaDB implements Calvin, a transaction protocol created by Dr. Daniel Abadi, the author of the PACELC theorem, and offers users adjustable controls for LC tradeoff. It is PC/EC for strictly serializable transactions, and EL for serializable reads.
== See also ==
CAP theorem
Consistency model
Fallacies of distributed computing
Lambda architecture (solution)
Paxos (computer science)
Project management triangle
Raft (algorithm)
Trilemma
== Notes ==
== References ==
== External links ==
"Consistency Tradeoffs in Modern Distributed Database System Design", by Daniel J. Abadi, Yale University Original paper that formalized PACELC
"Problems with CAP, and Yahoo's little known NoSQL system", by Daniel J. Abadi, Yale University. Original blog post that first described PACELC
"Proving PACELC", by Wojciech Golab, University of Waterloo Formal proof of the PACELC theorem | Wikipedia/PACELC_design_principle |
In computing, the network model is a database model conceived as a flexible way of representing objects and their relationships. Its distinguishing feature is that the schema, viewed as a graph in which object types are nodes and relationship types are arcs, is not restricted to being a hierarchy or lattice.
The network model was adopted by the CODASYL Data Base Task Group in 1969 and underwent a major update in 1971. It is sometimes known as the CODASYL model for this reason. A number of network database systems became popular on mainframe and minicomputers through the 1970s before being widely replaced by relational databases in the 1980s.
== Overview ==
While the hierarchical database model structures data as a tree of records, with each record having one parent record and many children, the network model allows each record to have multiple parent and child records, forming a generalized graph structure. This property applies at two levels: the schema is a generalized graph of record types connected by relationship types (called "set types" in CODASYL), and the database itself is a generalized graph of record occurrences connected by relationships (CODASYL "sets"). Cycles are permitted at both levels. Peer-to-Peer and Client Server are examples of Network Models.
The chief argument in favour of the network model, in comparison to the hierarchical model, was that it allowed a more natural modeling of relationships between entities. Although the model was widely implemented and used, it failed to become dominant for two main reasons. Firstly, IBM chose to stick to the hierarchical model with semi-network extensions in their established products such as IMS and DL/I. Secondly, it was eventually displaced by the relational model, which offered a higher-level, more declarative interface. Until the early 1980s the performance benefits of the low-level navigational interfaces offered by hierarchical and network databases were persuasive for many large-scale applications, but as hardware became faster, the extra productivity and flexibility of the relational model led to the gradual obsolescence of the network model in corporate enterprise usage.
== History ==
The network model's original inventor was Charles Bachman, and it was developed into a standard specification published in 1969 by the Conference on Data Systems Languages (CODASYL) Consortium. This was followed by a second publication in 1971, which became the basis for most implementations. Subsequent work continued into the early 1980s, culminating in an ISO specification, but this had little influence on products.
Bachman's influence is recognized in the term Bachman diagram, a diagrammatic notation that represents a database schema expressed using the network model. In a Bachman diagram, named rectangles represent record types, and arrows represent one-to-many relationship types between records (CODASYL set types).
== Database systems ==
Some well-known database systems that use the network model include:
IMAGE for HP 3000
Integrated Data Store (IDS)
IDMS (Integrated Database Management System)
Univac DMS-1100
Norsk Data SIBAS
Oracle CODASYL DBMS for OpenVMS (originally known as DEC VAX DBMS)
== See also ==
Navigational database
Graph database
== References ==
David M, k., 1997. Fundamentals, Design, and Implementation. database processing ed. s.l.:Prentice-Hall.
== Further reading ==
Charles W. Bachman, The Programmer as Navigator. Turing Award lecture, Communications of the ACM, Volume 16, Issue 11, 1973, pp. 653–658, ISSN 0001-0782, doi:10.1145/355611.362534
== External links ==
"CODASYL Systems Committee "Survey of Data Base Systems"" (PDF). 1968-09-03. Archived from the original (PDF) on 2007-10-12.
Network (CODASYL) Data Model
SIBAS Database running on Norsk Data Servers | Wikipedia/Network_model |
A physical data model (or database design) is a representation of a data design as implemented, or intended to be implemented, in a database management system. In the lifecycle of a project it typically derives from a logical data model, though it may be reverse-engineered from a given database implementation. A complete physical data model will include all the database artifacts required to create relationships between tables or to achieve performance goals, such as indexes, constraint definitions, linking tables, partitioned tables or clusters. Analysts can usually use a physical data model to calculate storage estimates; it may include specific storage allocation details for a given database system.
As of 2012 seven main databases dominate the commercial marketplace: Informix, Oracle, Postgres, SQL Server, Sybase, IBM Db2 and MySQL. Other RDBMS systems tend either to be legacy databases or used within academia such as universities or further education colleges. Physical data models for each implementation would differ significantly, not least due to underlying operating-system requirements that may sit underneath them. For example: SQL Server runs only on Microsoft Windows operating-systems (Starting with SQL Server 2017, SQL Server runs on Linux. It's the same SQL Server database engine, with many similar features and services regardless of your operating system), while Oracle and MySQL can run on Solaris, Linux and other UNIX-based operating-systems as well as on Windows. This means that the disk requirements, security requirements and many other aspects of a physical data model will be influenced by the RDBMS that a database administrator (or an organization) chooses to use.
== Physical schema ==
Physical schema is a term used in data management to describe how data is to be represented and stored (files, indices, et al.) in secondary storage using a particular database management system (DBMS) (e.g., Oracle RDBMS, Sybase SQL Server, etc.).
In the ANSI/SPARC Architecture three schema approach, the internal schema is the view of data that involved data management technology. This is as opposed to an external schema that reflects an individual's view of the data, or the conceptual schema that is the integration of a set of external schemas.
Subsequently the internal schema was recognized to have two parts:
The logical schema was the way data were represented to conform to the constraints of a particular approach to database management. At that time the choices were hierarchical and network. Describing the logical schema, however, still did not describe how physically data would be stored on disk drives. That is the domain of the physical schema. Now logical schemas describe data in terms of relational tables and columns, object-oriented classes, and XML tags.
A single set of tables, for example, can be implemented in numerous ways, up to and including an architecture where table rows are maintained on computers in different countries.
== See also ==
Database schema
Conceptual data model
Logical data model
== References ==
== External links ==
FEA Consolidated Reference Model Document (whitehouse.gov) Oct 2007. | Wikipedia/Physical_data_model |
A hierarchical database model is a data model in which the data is organized into a tree-like structure. The data are stored as records which is a collection of one or more fields. Each field contains a single value, and the collection of fields in a record defines its type. One type of field is the link, which connects a given record to associated records. Using links, records link to other records, and to other records, forming a tree. An example is a "customer" record that has links to that customer's "orders", which in turn link to "line_items".
The hierarchical database model mandates that each child record has only one parent, whereas each parent record can have zero or more child records. The network model extends the hierarchical by allowing multiple parents and children. In order to retrieve data from these databases, the whole tree needs to be traversed starting from the root node. Both models were well suited to data that was normally stored on tape drives, which had to move the tape from end to end in order to retrieve data.
When the relational database model emerged, one criticism of hierarchical database models was their close dependence on application-specific implementation. This limitation, along with the relational model's ease of use, contributed to the popularity of relational databases, despite their initially lower performance in comparison with the existing network and hierarchical models.
== History ==
The hierarchical structure was developed by IBM in the 1960s and used in early mainframe DBMS. Records' relationships form a treelike model. This structure is simple but inflexible because the relationship is confined to a one-to-many relationship. The IBM Information Management System (IMS) and RDM Mobile are examples of a hierarchical database system with multiple hierarchies over the same data.
The hierarchical data model lost traction as Codd's relational model became the de facto standard used by virtually all mainstream database management systems. A relational-database implementation of a hierarchical model was first discussed in published form in 1992 (see also nested set model). Hierarchical data organization schemes resurfaced with the advent of XML in the late 1990s (see also XML database). The hierarchical structure is used primarily today for storing geographic information and file systems.
Currently, hierarchical databases are still widely used especially in applications that require very high performance and availability such as banking, health care, and telecommunications. One of the most widely used commercial hierarchical databases is IMS.
Another example of the use of hierarchical databases is Windows Registry in the Microsoft Windows operating systems.
== Examples of hierarchical data represented as relational tables ==
An organization could store employee information in a table that contains attributes/columns such as employee number, first name, last name, and department number. The organization provides each employee with computer hardware as needed, but computer equipment may only be used by the employee to which it is assigned. The organization could store the computer hardware information in a separate table that includes each part's serial number, type, and the employee that uses it. The tables might look like this:
In this model, the employee data table represents the "parent" part of the hierarchy, while the computer table represents the "child" part of the hierarchy.
In contrast to tree structures usually found in computer software algorithms, in this model the children point to the parents.
As shown, each employee may possess several pieces of computer equipment, but each individual piece of computer equipment may have only one employee owner.
Consider the following structure:
In this, the "child" is the same type as the "parent". The hierarchy stating EmpNo 10 is boss of 20, and 30 and 40 each report to 20 is represented by the "ReportsTo" column. In Relational database terms, the ReportsTo column is a foreign key referencing the EmpNo column. If the "child" data type were different, it would be in a different table, but there would still be a foreign key referencing the EmpNo column of the employees table.
This simple model is commonly known as the adjacency list model and was introduced by Dr. Edgar F. Codd after initial criticisms surfaced that the relational model could not model hierarchical data. However, the model is only a special case of a general adjacency list for a graph.
== See also ==
Tree structure
Hierarchical query
Hierarchical clustering
== References ==
== External links ==
Troels' links to Hierarchical data in RDBMSs
Managing Hierarchical Data in MySQL (This page is from archive.org as the page has been removed from MySQL.com)
Hierarchical data in MySQL: parents and children in one query
Create Hierarchy Chart from Hierarchical Database | Wikipedia/Hierarchical_model |
In systems analysis, a one-to-many relationship is a type of cardinality that refers to the relationship between two entities (see also entity–relationship model). For example, take a car and an owner of the car. The car can only be owned by one owner at a time or not owned at all, and an owner could own zero, one, or multiple cars. One owner could have many cars, one-to-many.
In a relational database, a one-to-many relationship exists when one record is related to many records of another table. A one-to-many relationship is not a property of the data, but rather of the relationship itself. One-to-many often refer to a primary key to foreign key relationship between two tables, where the record in the first table can relate to multiple records in the second table. A foreign key is one side of the relationship that shows a row or multiple rows, with one of those rows being the primary key already listed on the first table. This is also called a foreign key constraint, which is important to keep data from being duplicated and have relationships within the database stay reliable as more information is added.
Many-to-many relationships are not able to be used in relational databases and must be converted to one-to-many relationships. Both one-to-many and one-to-one relationships are common in relational databases.
The opposite of one-to-many is many-to-one. The transpose of a one-to-many relationship is a many-to-one relationship.
== Entity relationship diagram (ERD) notations ==
One notation as described in Entity Relationship modeling is Chen notation or formally Chen ERD notation created originally by Peter Chen in 1976 where a one-to-many relationship is notated as 1:N where N represents the cardinality and can be 0 or higher.
A many-to-one relationship is sometimes notated as N:1.
== See also ==
One-to-one (data model)
Many-to-many (data model)
== References == | Wikipedia/One-to-many_(data_model) |
In the field of database design, a multi-model database is a database management system designed to support multiple data models against a single, integrated backend. In contrast, most database management systems are organized around a single data model that determines how data can be organized, stored, and manipulated. Document, graph, relational, and key–value models are examples of data models that may be supported by a multi-model database.
== Background ==
The relational data model became popular after its publication by Edgar F. Codd in 1970. Due to increasing requirements for horizontal scalability and fault tolerance, NoSQL databases became prominent after 2009. NoSQL databases use a variety of data models, with document, graph, and key–value models being popular.
A multi-model database is a database that can store, index and query data in more than one model. For some time, databases have primarily supported only one model, such as: relational database, document-oriented database, graph database or triplestore. A database that combines many of these is multi-model.
For some time, it was all but forgotten (or considered irrelevant) that there were any other database models besides relational. The relational model and notion of third normal form were the default standard for all data storage. However, prior to the dominance of relational data modeling, from about 1980 to 2005, the hierarchical database model was commonly used. Since 2000 or 2010, many NoSQL models that are non-relational, including documents, triples, key–value stores and graphs are popular. Arguably, geospatial data, temporal data, and text data are also separate models, though indexed, queryable text data is generally termed a "search engine" rather than a database.
The first time the word "multi-model" has been associated to the databases was on May 30, 2012 in Cologne, Germany, during the Luca Garulli's key note "NoSQL Adoption – What’s the Next Step?". Luca Garulli envisioned the evolution of the 1st generation NoSQL products into new products with more features able to be used by multiple use cases.
The idea of multi-model databases can be traced back to Object–Relational Data Management Systems (ORDBMS) in the early 1990s and in a more broader scope even to federated and integrated DBMSs in the early 1980s. An ORDBMS system manages different types of data such as relational, object, text and spatial by plugging domain specific data types, functions and index implementations into the DBMS kernels. A multi-model database is most directly a response to the "polyglot persistence" approach of knitting together multiple database products, each handing a different model, to achieve a multi-model capability as described by Martin Fowler. This strategy has two major disadvantages: it leads to a significant increase in operational complexity, and there is no support for maintaining data consistency across the separate data stores, so multi-model databases have begun to fill in this gap.
Multi-model databases are intended to offer the data modeling advantages of polyglot persistence, without its disadvantages. Operational complexity, in particular, is reduced through the use of a single data store.
== Benchmarking multi-model databases ==
As more and more platforms are proposed to deal with multi-model data, there are a few works on benchmarking multi-model databases. For instance, Pluciennik, Oliveira, and UniBench reviewed existing multi-model databases and made an evaluation effort towards comparing multi-model databases and other SQL and NoSQL databases respectively. They pointed out that the advantages of multi-model databases over single-model databases are as follows :
== Architecture ==
The main difference between the available multi-model databases is related to their architectures. Multi-model databases can support different models either within the engine or via different layers on top of the engine. Some products may provide an engine which supports documents and graphs while others provide layers on top of a key-key store. With a layered architecture, each data model is provided via its own component.
== User-defined data models ==
In addition to offering multiple data models in a single data store, some databases allow developers to easily define custom data models. This capability is enabled by ACID transactions with high performance and scalability. In order for a custom data model to support concurrent updates, the database must be able to synchronize updates across multiple keys. ACID transactions, if they are sufficiently performant, allow such synchronization. JSON documents, graphs, and relational tables can all be implemented in a manner that inherits the horizontal scalability and fault-tolerance of the underlying data store.
== See also ==
Comparison of multi-model databases
ACID
Big data
NoSQL
Comparison of structured storage software
Database transaction
Data analysis
Distributed database
Distributed SQL
Distributed transaction
Document-oriented database
Graph database
Relational model
== References ==
== External links ==
Polyglot Persistence
The 451 Group, "Neither Fish Nor Fowl: The Rise of Multi-Model Databases"
ODBMS, "On Multi-Model Databases. Interview with Martin Schönert and Frank Celler."
ODBMS, "Polyglot Persistence or Multiple Data Models?"
Infoworld, "The Rise of the Multi-Model Database" | Wikipedia/Multi-model_database |
A database application is a computer program whose primary purpose is retrieving information from a computerized database. From here, information can be inserted, modified or deleted which is subsequently conveyed back into the database. Early examples of database applications were accounting systems and airline reservations systems, such as SABRE, developed starting in 1957.
A characteristic of modern database applications is that they facilitate simultaneous updates and queries from multiple users. Systems in the 1970s might have accomplished this by having each user in front of a 3270 terminal to a mainframe computer. By the mid-1980s it was becoming more common to give each user a personal computer and have a program running on that PC that is connected to a database server. Information would be pulled from the database, transmitted over a network, and then arranged, graphed, or otherwise formatted by the program running on the PC. Starting in the mid-1990s it became more common to build database applications with a Web interface. Rather than develop custom software to run on a user's PC, the user would use the same Web browser program for every application. A database application with a Web interface had the advantage that it could be used on devices of different sizes, with different hardware, and with different operating systems. Examples of early database applications with Web interfaces include amazon.com, which used the Oracle relational database management system, the photo.net online community, whose implementation on top of Oracle was described in the book Database-Backed Web Sites (Ziff-Davis Press; May 1997), and eBay, also running Oracle.
Electronic medical records are referred to on emrexperts.com, in December 2010, as "a software database application". A 2005 O'Reilly book uses the term in its title: Database Applications and the Web.
Some of the most complex database applications remain accounting systems, such as SAP, which may contain thousands of tables in only a single module. Many of today's most widely used computer systems are database applications, for example, Facebook, which was built on top of MySQL.
The etymology of the phrase "database application" comes from the practice of dividing computer software into systems programs, such as the operating system, compilers, the file system, and tools such as the database management system, and application programs, such as a payroll check processor. On a standard PC running Microsoft Windows, for example, the Windows operating system contains all of the systems programs while games, word processors, spreadsheet programs, photo editing programs, etc. would be application programs. As "application" is short for "application program", "database application" is short for "database application program".
Not every program that uses a database would typically be considered a "database application". For example, many physics experiments, e.g., the Large Hadron Collider, generate massive data sets that programs subsequently analyze. The data sets constitute a "database", though they are not typically managed with a standard relational database management system. The computer programs that analyze the data are primarily developed to answer hypotheses, not to put information back into the database and therefore the overall program would not be called a "database application".
== Examples of database applications ==
Amazon
Student Data
CNN
eBay
Facebook
Fandango
Filemaker (Mac OS)
LibreOffice Base
Microsoft Access
Oracle relational database
SAP (Systems, Applications & Products in Data Processing)
Ticketmaster
Wikipedia
Yelp
YouTube
Google
MySQL
== References ==
== External links ==
Application Development with DB2 (ibm.com)
Microsoft SQL Server Application Development
Oracle Database Application Development | Wikipedia/Database_application |
In relational algebra, a selection (sometimes called a restriction in reference to E.F. Codd's 1970 paper and not, contrary to a popular belief, to avoid confusion with SQL's use of SELECT, since Codd's article predates the existence of SQL) is a unary operation that denotes a subset of a relation.
A selection is written as
σ
a
θ
b
(
R
)
{\displaystyle \sigma _{a\theta b}(R)}
or
σ
a
θ
v
(
R
)
{\displaystyle \sigma _{a\theta v}(R)}
where:
a and b are attribute names
θ is a binary operation in the set
{
<
,
≤
,
=
,
≠
,
≥
,
>
}
{\displaystyle \{\;<,\leq ,=,\neq ,\geq ,\;>\}}
v is a value constant
R is a relation
The selection
σ
a
θ
b
(
R
)
{\displaystyle \sigma _{a\theta b}(R)}
denotes all tuples in R for which θ holds between the a and the b attribute.
The selection
σ
a
θ
v
(
R
)
{\displaystyle \sigma _{a\theta v}(R)}
denotes all tuples in R for which θ holds between the a attribute and the value v.
For an example, consider the following tables where the first table gives the relation Person, the second table gives the result of
σ
Age
≥
34
(
Person
)
{\displaystyle \sigma _{{\text{Age}}\geq 34}({\text{Person}})}
and the third table gives the result of
σ
Age
=
Weight
(
Person
)
{\displaystyle \sigma _{{\text{Age}}={\text{Weight}}}({\text{Person}})}
.
More formally the semantics of the selection is defined as
follows:
σ
a
θ
b
(
R
)
=
{
t
:
t
∈
R
,
t
(
a
)
θ
t
(
b
)
}
{\displaystyle \sigma _{a\theta b}(R)=\{\ t:t\in R,\ t(a)\ \theta \ t(b)\ \}}
σ
a
θ
v
(
R
)
=
{
t
:
t
∈
R
,
t
(
a
)
θ
v
}
{\displaystyle \sigma _{a\theta v}(R)=\{\ t:t\in R,\ t(a)\ \theta \ v\ \}}
The result of the selection is only defined if the attribute names that it mentions are in the heading of the relation that it operates upon.
== Generalized selection ==
A generalized selection is a unary operation written as
σ
φ
(
R
)
{\displaystyle \sigma _{\varphi }(R)}
where
φ
{\displaystyle \varphi }
is a propositional formula that consists of atoms as allowed in the normal selection and, in addition, the logical operators ∧ (and), ∨ (or) and
¬
{\displaystyle \lnot }
(negation). This selection selects all those tuples in R for which
φ
{\displaystyle \varphi }
holds.
For an example, consider the following tables where the first table gives the relation Person and the second the result of
σ
Age
≥
30
∧
Weight
≤
60
(
Person
)
{\displaystyle \sigma _{{\text{Age}}\geq 30\ \land \ {\text{Weight}}\leq 60}({\text{Person}})}
.
Formally the semantics of the generalized selection is defined as follows:
σ
φ
(
R
)
=
{
t
:
t
∈
R
,
φ
(
t
)
}
{\displaystyle \sigma _{\varphi }(R)=\{\ t:t\in R,\ \varphi (t)\ \}}
The result of the selection is only defined if the attribute names that it mentions are in the header of the relation that it operates upon.
The generalized selection is expressible with other basic algebraic operations. A simulation of generalized selection using the fundamental operators is defined by the following rules:
σ
φ
∧
ψ
(
R
)
=
σ
φ
(
R
)
∩
σ
ψ
(
R
)
{\displaystyle \sigma _{\varphi \land \psi }(R)=\sigma _{\varphi }(R)\cap \sigma _{\psi }(R)}
σ
φ
∨
ψ
(
R
)
=
σ
φ
(
R
)
∪
σ
ψ
(
R
)
{\displaystyle \sigma _{\varphi \lor \psi }(R)=\sigma _{\varphi }(R)\cup \sigma _{\psi }(R)}
σ
¬
φ
(
R
)
=
R
−
σ
φ
(
R
)
{\displaystyle \sigma _{\lnot \varphi }(R)=R-\sigma _{\varphi }(R)}
== Computer languages ==
In computer languages it is expected that any truth-valued expression be permitted as the selection condition rather than restricting it to be a simple comparison.
In SQL, selections are performed by using WHERE definitions in SELECT, UPDATE, and DELETE statements, but note that the selection condition can result in any of three truth values (true, false and unknown) instead of the usual two.
In SQL, general selections are performed by using WHERE definitions with AND, OR, or NOT operands in SELECT, UPDATE, and DELETE statements.
== References ==
== External links ==
http://cisnet.baruch.cuny.edu/holowczak/classes/3400/relationalalgebra/#selectionoperator | Wikipedia/Selection_(relational_algebra) |
An object–relational database (ORD), or object–relational database management system (ORDBMS), is a database management system (DBMS) similar to a relational database, but with an object-oriented database model: objects, classes and inheritance are directly supported in database schemas and in the query language. Also, as with pure relational systems, it supports extension of the data model with custom data types and methods.
An object–relational database can be said to provide a middle ground between relational databases and object-oriented databases. In object–relational databases, the approach is essentially that of relational databases: the data resides in the database and is manipulated collectively with queries in a query language; at the other extreme are OODBMSes in which the database is essentially a persistent object store for software written in an object-oriented programming language, with an application programming interface API for storing and retrieving objects, and little or no specific support for querying.
== Overview ==
The basic need of object–relational database arises from the fact that both Relational and Object database have their individual advantages and drawbacks. The isomorphism of the relational database system with a mathematical relation allows it to exploit many useful techniques and theorems from set theory. But these types of databases are not optimal for certain kinds of applications. An object oriented database model allows containers like sets and lists, arbitrary user-defined datatypes as well as nested objects. This brings commonality between the application type systems and database type systems which removes any issue of impedance mismatch. But object databases, unlike relational do not provide any mathematical base for their deep analysis.
The basic goal for the object–relational database is to bridge the gap between relational databases and the object-oriented modeling techniques used in programming languages such as Java, C++, Visual Basic (.NET) or C#. However, a more popular alternative for achieving such a bridge is to use a standard relational database systems with some form of object–relational mapping (ORM) software. Whereas traditional RDBMS or SQL-DBMS products focused on the efficient management of data drawn from a limited set of data-types (defined by the relevant language standards), an object–relational DBMS allows software developers to integrate their own types and the methods that apply to them into the DBMS.
The ORDBMS (like ODBMS or OODBMS) is integrated with an object-oriented programming language. The characteristic properties of ORDBMS are 1) complex data, 2) type inheritance, and 3) object behavior. Complex data creation in most SQL ORDBMSs is based on preliminary schema definition via the user-defined type (UDT). Hierarchy within structured complex data offers an added property, type inheritance. That is, a structured type can have subtypes that reuse all of its attributes and contain additional attributes specific to the subtype. Another advantage, the object behavior, is related with access to the program objects. Such program objects must be storable and transportable for database processing, therefore they usually are named as persistent objects. Inside a database, all the relations with a persistent program object are relations with its object identifier (OID). All of these points can be addressed in a proper relational system, although the SQL standard and its implementations impose arbitrary restrictions and additional complexity
In object-oriented programming (OOP), object behavior is described through the methods (object functions). The methods denoted by one name are distinguished by the type of their parameters and type of objects for which they attached (method signature). The OOP languages call this the polymorphism principle, which briefly is defined as "one interface, many implementations". Other OOP principles, inheritance and encapsulation, are related both to methods and attributes. Method inheritance is included in type inheritance. Encapsulation in OOP is a visibility degree declared, for example, through the public, private and protected access modifiers.
== History ==
Object–relational database management systems grew out of research that occurred in the early 1990s. That research extended existing relational database concepts by adding object concepts. The researchers aimed to retain a declarative query-language based on predicate calculus as a central component of the architecture. Probably the most notable research project, Postgres (UC Berkeley), spawned two products tracing their lineage to that research: Illustra and PostgreSQL.
In the mid-1990s, early commercial products appeared. These included Illustra (Illustra Information Systems, acquired by Informix Software, which was in turn acquired by International Business Machines (IBM), Omniscience (Omniscience Corporation, acquired by Oracle Corporation and became the original Oracle Lite), and UniSQL (UniSQL, Inc., acquired by KCOM Group). Ukrainian developer Ruslan Zasukhin, founder of Paradigma Software, Inc., developed and shipped the first version of Valentina database in the mid-1990s as a C++ software development kit (SDK). By the next decade, PostgreSQL had become a commercially viable database, and is the basis for several current products that maintain its ORDBMS features.
Computer scientists came to refer to these products as "object–relational database management systems" or ORDBMSs.
Many of the ideas of early object–relational database efforts have largely become incorporated into SQL:1999 via structured types. In fact, any product that adheres to the object-oriented aspects of SQL:1999 could be described as an object–relational database management product. For example, IBM Db2, Oracle Database, and Microsoft SQL Server, make claims to support this technology and do so with varying degrees of success.
== Comparison to RDBMS ==
An RDBMS might commonly involve SQL statements such as these:
Most current SQL databases allow the crafting of custom functions, which would allow the query to appear as:
In an object–relational database, one might see something like this, with user-defined data-types and expressions such as BirthDay():
The object–relational model can offer another advantage in that the database can make use of the relationships between data to easily collect related records. In an address book application, an additional table would be added to the ones above to hold zero or more addresses for each customer. Using a traditional RDBMS, collecting information for both the user and their address requires a "join":
The same query in an object–relational database appears more simply:
== See also ==
Document-oriented database
SQL
Comparison of object–relational database management systems
Structured Type
Object database
Object–relational mapping
Relational model
Language Integrated Query
Entity Framework
== References ==
== External links ==
Savushkin, Sergey (2003), A Point of View on ORDBMS, archived from the original on 2012-03-01, retrieved 2012-07-21.
JPA Performance Benchmark – comparison of Java JPA ORM Products (Hibernate, EclipseLink, OpenJPA, DataNucleus).
PolePosition Benchmark – shows the performance trade-offs for solutions in the object–relational impedance mismatch context. | Wikipedia/Object–relational_model |
In relational algebra, a projection is a unary operation written as
Π
a
1
,
.
.
.
,
a
n
(
R
)
{\displaystyle \Pi _{a_{1},...,a_{n}}(R)}
, where
R
{\displaystyle R}
is a relation and
a
1
,
.
.
.
,
a
n
{\displaystyle a_{1},...,a_{n}}
are attribute names. Its result is defined as the set obtained when the components of the tuples in
R
{\displaystyle R}
are restricted to the set
{
a
1
,
.
.
.
,
a
n
}
{\displaystyle \{a_{1},...,a_{n}\}}
– it discards (or excludes) the other attributes.
In practical terms, if a relation is thought of as a table, then projection can be thought of as picking a subset of its columns. For example, if the attributes are (name, age), then projection of the relation {(Alice, 5), (Bob, 8)} onto attribute list (age) yields {5,8} – we have discarded the names, and only know what ages are present.
Projections may also modify attribute values. For example, if
R
{\displaystyle R}
has attributes
a
{\displaystyle a}
,
b
{\displaystyle b}
,
c
{\displaystyle c}
, where the values of
b
{\displaystyle b}
are numbers, then
Π
a
,
b
×
0.5
,
c
(
R
)
{\displaystyle \Pi _{a,\ b\times 0.5,\ c}(R)}
is like
R
{\displaystyle R}
, but with all
b
{\displaystyle b}
-values halved.
== Related concepts ==
The closely related concept in set theory (see: projection (set theory)) differs from that of relational algebra in that, in set theory, one projects onto ordered components, not onto attributes. For instance, projecting
(
3
,
7
)
{\displaystyle (3,7)}
onto the second component yields 7.
Projection is relational algebra's counterpart of existential quantification in predicate logic. The attributes not included correspond to existentially quantified variables in the predicate whose extension the operand relation represents. The example below illustrates this point.
Because of the correspondence with existential quantification, some authorities prefer to define projection in terms of the excluded attributes. In a computer language it is of course possible to provide notations for both, and that was done in ISBL and several languages that have taken their cue from ISBL.
A nearly identical concept occurs in the category of monoids, called a string projection, which consists of removing all of the letters in the string that do not belong to a given alphabet.
When implemented in SQL standard the "default projection" returns a multiset instead of a set, and the π projection is obtained by the addition of the DISTINCT keyword to eliminate duplicate data.
== Example ==
For an example, consider the relations depicted in the following two tables which are the relation Person and its projection on (some say "over") the attributes Age and Weight:
Suppose the predicate of Person is "Name is age years old and weighs weight." Then the given projection represents the predicate, "There exists Name such that Name is age years old and weighs weight."
Note that Harry and Peter have the same age and weight, but since the result is a relation, and therefore a set, this combination only appears once in the result.
== Formal definition ==
More formally the semantics of projection are defined as follows:
Π
a
1
,
.
.
.
,
a
n
(
R
)
=
{
t
[
a
1
,
.
.
.
,
a
n
]
:
t
∈
R
}
,
{\displaystyle \Pi _{a_{1},...,a_{n}}(R)=\{\ t[a_{1},...,a_{n}]:\ t\in R\ \},}
where
t
[
a
1
,
.
.
.
,
a
n
]
{\displaystyle t[a_{1},...,a_{n}]}
is the restriction of the tuple
t
{\displaystyle t}
to the set
{
a
1
,
.
.
.
,
a
n
}
{\displaystyle \{a_{1},...,a_{n}\}}
so that
t
[
a
1
,
.
.
.
,
a
n
]
=
{
(
a
′
,
v
)
|
(
a
′
,
v
)
∈
t
,
a
′
∈
{
a
1
,
.
.
.
,
a
n
}
}
,
{\displaystyle t[a_{1},...,a_{n}]=\{\ (a',v)\ |\ (a',v)\in t,\ a'\in \{a_{1},...,a_{n}\}\},}
where
(
a
′
,
v
)
{\displaystyle (a',v)}
is an attribute value,
a
′
{\displaystyle a'}
is an attribute name, and
v
{\displaystyle v}
is an element of that attribute's domain — see Relation (database).
The result of a projection
Π
a
1
,
.
.
.
,
a
n
(
R
)
{\displaystyle \Pi _{a_{1},...,a_{n}}(R)}
is defined only if
{
a
1
,
.
.
.
,
a
n
}
{\displaystyle \{a_{1},...,a_{n}\}}
is a subset of the header of
R
{\displaystyle R}
.
Projection over no attributes at all is possible, yielding a relation of degree zero. In this case the cardinality of the result is zero if the operand is empty, otherwise one. The two relations of degree zero are the only ones that cannot be depicted as tables.
== See also ==
Projection (set theory)
== References == | Wikipedia/Projection_(relational_algebra) |
The V-model is a graphical representation of a systems development lifecycle. It is used to produce rigorous development lifecycle models and project management models. The V-model falls into three broad categories, the German V-Modell, a general testing model, and the US government standard.
The V-model summarizes the main steps to be taken in conjunction with the corresponding deliverables within computerized system validation framework, or project life cycle development. It describes the activities to be performed and the results that have to be produced during product development.
The left side of the "V" represents the decomposition of requirements, and the creation of system specifications. The right side of the "V" represents an integration of parts and their validation. However, requirements need to be validated first against the higher level requirements or user needs. Furthermore, there is also something as validation of system models. This can partially be done on the left side also. To claim that validation only occurs on the right side may not be correct. The easiest way is to say that verification is always against the requirements (technical terms) and validation is always against the real world or the user's needs. The aerospace standard RTCA DO-178B states that requirements are validated—confirmed to be true—and the end product is verified to ensure it satisfies those requirements.
Validation can be expressed with the query "Are you building the right thing?" and verification with "Are you building it right?"
== Types ==
There are three general types of V-model.
=== V-Modell ===
"V-Modell" is the official project management method of the German government. It is roughly equivalent to PRINCE2, but more directly relevant to software development. The key attribute of using a "V" representation was to require proof that the products from the left-side of the V were acceptable by the appropriate test and integration organization implementing the right-side of the V.
=== General testing ===
Throughout the testing community worldwide, the V-model is widely seen as a vaguer illustrative depiction of the software development process as described in the International Software Testing Qualifications Board Foundation Syllabus for software testers. There is no single definition of this model, which is more directly covered in the alternative article on the V-Model (software development).
=== US government standard ===
The US also has a government standard V-model. Its scope is a narrower systems development lifecycle model, but far more detailed and more rigorous than most UK practitioners and testers would understand by the V-model.
== Validation vs. verification ==
It is sometimes said that validation can be expressed by the query "Are you building the right thing?" and verification by "Are you building it right?" In practice, the usage of these terms varies.
The PMBOK guide, also adopted by the IEEE as a standard (jointly maintained by INCOSE, the Systems engineering Research Council SERC, and IEEE Computer Society) defines them as follows in its 4th edition:
"Validation. The assurance that a product, service, or system meets the needs of the customer and other identified stakeholders. It often involves acceptance and suitability with external customers. Contrast with verification."
"Verification. The evaluation of whether or not a product, service, or system complies with a regulation, requirement, specification, or imposed condition. It is often an internal process. Contrast with validation."
== Objectives ==
The V-model provides guidance for the planning and realization of projects. The following objectives are intended to be achieved by a project execution:
Minimization of project risks: The V-model improves project transparency and project control by specifying standardized approaches and describing the corresponding results and responsible roles. It permits an early recognition of planning deviations and risks and improves process management, thus reducing the project risk.
Improvement and guarantee of quality: As a standardized process model, the V-model ensures that the results to be provided are complete and have the desired quality. Defined interim results can be checked at an early stage. Uniform product contents will improve readability, understandability and verifiability.
Reduction of total cost over the entire project and system life cycle: The effort for the development, production, operation and maintenance of a system can be calculated, estimated and controlled in a transparent manner by applying a standardized process model. The results obtained are uniform and easily retraced. This reduces the acquirer's dependency on the supplier and the effort for subsequent activities and projects.
Improvement of communication between all stakeholders: The standardized and uniform description of all relevant elements and terms is the basis for the mutual understanding between all stakeholders. Thus, the frictional loss between user, acquirer, supplier and developer is reduced.
== V-model topics ==
=== Systems engineering and verification ===
The systems engineering process (SEP) provides a path for improving the cost-effectiveness of complex systems as experienced by the system owner over the entire life of the system, from conception to retirement.
It involves early and comprehensive identification of goals, a concept of operations that describes user needs and the operating environment, thorough and testable system requirements, detailed design, implementation, rigorous acceptance testing of the implemented system to ensure it meets the stated requirements (system verification), measuring its effectiveness in addressing goals (system validation), on-going operation and maintenance, system upgrades over time, and eventual retirement.
The process emphasizes requirements-driven design and testing. All design elements and acceptance tests must be traceable to one or more system requirements and every requirement must be addressed by at least one design element and acceptance test. Such rigor ensures nothing is done unnecessarily and everything that is necessary is accomplished.
=== The two streams ===
==== Specification stream ====
The specification stream mainly consists of:
User requirement specifications
Functional requirement specifications
Design specifications
==== Testing stream ====
The testing stream generally consists of:
Installation qualification (IQ)
Operational qualification (OQ)
Performance qualification (PQ)
The development stream can consist (depending on the system type and the development scope) of customization, configuration or coding.
== Applications ==
The V-model is used to regulate the software development process within the German federal administration. Nowadays it is still the standard for German federal administration and defense projects, as well as software developers within the region.
The concept of the V-model was developed simultaneously, but independently, in Germany and in the United States in the late 1980s:
The German V-model was originally developed by IABG in Ottobrunn, near Munich, in cooperation with the Federal Office for Defense Technology and Procurement in Koblenz, for the Federal Ministry of Defense. It was taken over by the Federal Ministry of the Interior for the civilian public authorities domain in summer 1992.
The US V-model, as documented in the 1991 proceedings for the National Council on Systems Engineering (NCOSE; now INCOSE as of 1995), was developed for satellite systems involving hardware, software, and human interaction.
The V-model first appeared at Hughes Aircraft circa 1982 as part of the pre-proposal effort for the FAA Advanced Automation System (AAS) program. It eventually formed the test strategy for the Hughes AAS Design Competition Phase (DCP) proposal. It was created to show the test and integration approach which was driven by new challenges to surface latent defects in the software. The need for this new level of latent defect detection was driven by the goal to start automating the thinking and planning processes of the air traffic controller as envisioned by the automated enroute air traffic control (AERA) program. The reason the V is so powerful comes from the Hughes culture of coupling all text and analysis to multi dimensional images. It was the foundation of Sequential Thematic Organization of Publications (STOP) created by Hughes in 1963 and used until Hughes was divested by the Howard Hughes Medical Institute in 1985.
The US Department of Defense puts the systems engineering process interactions into a V-model relationship.
It has now found widespread application in commercial as well as defense programs. Its primary use is in project management and throughout the project lifecycle.
One fundamental characteristic of the US V-model is that time and maturity move from left to right and one cannot move back in time. All iteration is along a vertical line to higher or lower levels in the system hierarchy, as shown in the figure. This has proven to be an important aspect of the model. The expansion of the model to a dual-Vee concept is treated in reference.
As the V-model is publicly available many companies also use it. In project management it is a method comparable to PRINCE2 and describes methods for project management as well as methods for system development. The V-model, while rigid in process, can be very flexible in application, especially as it pertains to the scope outside of the realm of the System Development Lifecycle normal parameters.
== Advantages ==
These are the advantages V-model offers in front of other systems development models:
The users of the V-model participate in the development and maintenance of the V-model. A change control board publicly maintains the V-model. The change control board meets anywhere from every day to weekly and processes all change requests received during system development and test.
The V-model provides concrete assistance on how to implement an activity and its work steps, defining explicitly the events needed to complete a work step: each activity schema contains instructions, recommendations and detailed explanations of the activity.
== Limitations ==
The following aspects are not covered by the V-model, they must be regulated in addition, or the V-model must be adapted accordingly:
The placing of contracts for services is not regulated.
The organization and execution of operation, maintenance, repair and disposal of the system are not covered by the V-model. However, planning and preparation of a concept for these tasks are regulated in the V-model.
The V-model addresses software development within a project rather than a whole organization.
== See also ==
Engineering information management (EIM)
ARCADIA (as supporting systems modeling method)
IBM Rational Unified Process (as a supporting software process)
Waterfall model of software development
Systems architecture
Systems design
Systems engineering
Model-based systems engineering
Theory U
== References ==
== External links ==
"INCOSE G2SEBOK 3.30: Vee Model of Systems Engineering Design and Integration". g2sebok.incose.org. International Council on Systems Engineering. Archived from the original on 2007-09-27.
"Das V-Modell XT". cio.bund.de (in German). Federal Office for Information Security (BMI).
"Using V Models for Testing". insights.sei.cmu.edu. Software Engineering Institute, Carnegie Mellon University. 11 November 2013. | Wikipedia/VEE_model |
Systems modeling or system modeling is the interdisciplinary study of the use of models to conceptualize and construct systems in business and IT development.
A common type of systems modeling is function modeling, with specific techniques such as the Functional Flow Block Diagram and IDEF0. These models can be extended using functional decomposition, and can be linked to requirements models for further systems partition.
Contrasting the functional modeling, another type of systems modeling is architectural modeling which uses the systems architecture to conceptually model the structure, behavior, and more views of a system.
The Business Process Modeling Notation (BPMN), a graphical representation for specifying business processes in a workflow, can also be considered to be a systems modeling language.
== Overview ==
In business and IT development the term "systems modeling" has multiple meanings. It can relate to:
the use of model to conceptualize and construct systems
the interdisciplinary study of the use of these models
the systems modeling, analysis, and design efforts
the systems modeling and simulation, such as system dynamics
any specific systems modeling language
As a field of study systems modeling has emerged with the development of system theory and systems sciences.
As a type of modeling systems modeling is based on systems thinking and the systems approach. In business and IT systems modeling contrasts other approaches such as:
agent based modeling
data modeling and
mathematical modeling
In "Methodology for Creating Business Knowledge" (1997) Arbnor and Bjerke the systems approach (systems modeling) was considered to be one of the three basic methodological approaches for gaining business knowledge, beside the analytical approach and the actor's approach (agent based modeling).
== History ==
The function model originates in the 1950s, after in the first half of the 20th century other types of management diagrams had already been developed. The first known Gantt chart was developed in 1896 by Karol Adamiecki, who called it a harmonogram. Because Adamiecki did not publish his chart until 1931 - and in any case his works were published in either Polish or Russian, languages not popular in the West - the chart now bears the name of Henry Gantt (1861–1919), who designed his chart around the years 1910-1915 and popularized it in the West. One of the first well defined function models, was the Functional Flow Block Diagram (FFBD) developed by the defense-related TRW Incorporated in the 1950s. In the 1960s it was exploited by the NASA to visualize the time sequence of events in a space systems and flight missions. It is further widely used in classical systems engineering to show the order of execution of system functions.
One of the earliest pioneering works in information systems modeling has been done by Young and Kent (1958), who argued:
Since we may be called upon to evaluate different computers or to find alternative ways of organizing current systems it is necessary to have some means of precisely stating a data processing problem independently of mechanization.
They aimed for a precise and abstract way of specifying the informational and time characteristics of a data processing problem, and wanted to create a notation that should enable the analyst to organize the problem around any piece of hardware. Their efforts was not so much focused on independent systems analysis, but on creating abstract specification and invariant basis for designing different alternative implementations using different hardware components.
A next step in IS modeling was taken by CODASYL, an IT industry consortium formed in 1959, who essentially aimed at the same thing as Young and Kent: the development of "a proper structure for machine independent problem definition language, at the system level of data processing". This led to the development of a specific IS information algebra.
== Types of systems modeling ==
In business and IT development systems are modeled with different scopes and scales of complexity, such as:
Functional modeling
Systems architecture
Business process modeling
Enterprise modeling
Further more like systems thinking, systems modeling in can be divided into:
Systems analysis
Hard systems modeling or operational research modeling
Soft system modeling
Process based system modeling
And all other specific types of systems modeling, such as form example complex systems modeling, dynamical systems modeling, and critical systems modeling.
== Specific types of modeling languages ==
Framework-specific modeling language
Systems Modeling Language
== See also ==
Behavioral modeling
Dynamic systems
Human visual system model – a human visual system model used by image processing, video processing, and computer vision
Open energy system models – energy system models adopting open science principles
SEQUAL framework
Software and Systems Modeling
Solar System model – a model that illustrates the relative positions and motions of the planets and stars
Statistical model
Systems analysis
Systems design
Systems biology modeling
Viable system model – a model of the organizational structure of any viable or autonomous system
== References ==
== Further reading ==
Doo-Kwon Baik eds. (2005). Systems modeling and simulation: theory and applications : third Asian Simulation Conference, AsiaSim 2004, Jeju Island, Korea, October 4–6, 2004. Springer, 2005. ISBN 3-540-24477-8.
Derek W. Bunn, Erik R. Larsen (1997). Systems modelling for energy policy. Wiley, 1997. ISBN 0-471-95794-1
Hartmut Ehrig et al. (eds.) (2005). Formal methods in software and systems modeling. Springer, 2005 ISBN 3-540-24936-2
D. J. Harris (1985). Mathematics for business, management, and economics: a systems modelling approach. E. Horwood, 1985. ISBN 0-85312-821-9
Jiming Liu, Xiaolong Jin, Kwok Ching Tsui (2005). Autonomy oriented computing: from problem solving to complex systems modeling. Springer, 2005. ISBN 1-4020-8121-9
Michael Pidd (2004). Systems Modelling: Theory and Practice. John Wiley & Sons, 2004. ISBN 0-470-86732-9
Václav Pinkava (1988). Introduction to Logic for Systems Modelling. Taylor & Francis, 1988. ISBN 0-85626-431-8 | Wikipedia/System_model |
Structured systems analysis and design method (SSADM) is a systems approach to the analysis and design of information systems. SSADM was produced for the Central Computer and Telecommunications Agency, a UK government office concerned with the use of technology in government, from 1980 onwards.
== Overview ==
SSADM is a waterfall method for the analysis and design of information systems. SSADM can be thought to represent a pinnacle of the rigorous document-led approach to system design, and contrasts with more contemporary agile methods such as DSDM or Scrum.
SSADM is one particular implementation and builds on the work of different schools of structured analysis and development methods, such as Peter Checkland's soft systems methodology, Larry Constantine's structured design, Edward Yourdon's Yourdon Structured Method, Michael A. Jackson's Jackson Structured Programming, and Tom DeMarco's structured analysis.
The names "Structured Systems Analysis and Design Method" and "SSADM" are registered trademarks of the Office of Government Commerce (OGC), which is an office of the United Kingdom's Treasury.
== History ==
The principal stages of the development of Structured System Analysing And Design Method were:
1980: Central Computer and Telecommunications Agency (CCTA) evaluate analysis and design methods.
1981: Consultants working for Learmonth & Burchett Management Systems, led by John Hall, chosen to develop SSADM v1.
1982: John Hall and Keith Robinson left to found Model Systems Ltd, LBMS later developed LSDM, their proprietary version.
1983: SSADM made mandatory for all new information system developments
1984: Version 2 of SSADM released
1986: Version 3 of SSADM released, adopted by NCC
1988: SSADM Certificate of Proficiency launched, SSADM promoted as 'open' standard
1989: Moves towards Euromethod, launch of CASE products certification scheme
1990: Version 4 launched
1993: SSADM V4 Standard and Tools Conformance Scheme
1995: SSADM V4+ announced, V4.2 launched
2000: CCTA renamed SSADM as "Business System Development". The method was repackaged into 15 modules and another 6 modules were added.
== SSADM techniques ==
The three most important techniques that are used in SSADM are as follows:
Logical Data Modelling
The process of identifying, modelling and documenting the data requirements of the system being designed. The result is a data model containing entities (things about which a business needs to record information), attributes (facts about the entities) and relationships (associations between the entities).
Data Flow Modelling
The process of identifying, modelling and documenting how data moves around an information system. Data Flow Modeling examines processes (activities that transform data from one form to another), data stores (the holding areas for data), external entities (what sends data into a system or receives data from a system), and data flows (routes by which data can flow).
Entity Event Modelling
A two-stranded process: Entity Behavior Modelling, identifying, modelling and documenting the events that affect each entity and the sequence (or life history) in which these events occur, and Event Modelling, designing for each event the process to coordinate entity life histories.
== Stages ==
The SSADM method involves the application of a sequence of analysis, documentation and design tasks concerned with the following.
=== Stage 0 – Feasibility study ===
In order to determine whether or not a given project is feasible, there must be some form of investigation into the goals and implications of the project. For very small scale projects this may not be necessary at all as the scope of the project is easily understood. In larger projects, the feasibility may be done but in an informal sense, either because there is no time for a formal study or because the project is a "must-have" and will have to be done one way or the other. A data flow Diagram is used to describe how the current system works and to visualize the known problems.
When a feasibility study is carried out, there are four main areas of consideration:
Technical – is the project technically possible?
Financial – can the business afford to carry out the project?
Organizational – will the new system be compatible with existing practices?
Ethical – is the impact of the new system socially acceptable?
To answer these questions, the feasibility study is effectively a condensed version of a comprehensive systems analysis and design. The requirements and usages are analyzed to some extent, some business options are drawn up and even some details of the technical implementation.
The product of this stage is a formal feasibility study document. SSADM specifies the sections that the study should contain including any preliminary models that have been constructed and also details of rejected options and the reasons for their rejection.
=== Stage 1 – Investigation of the current environment ===
The developers of SSADM understood that in almost all cases there is some form of current system even if it is entirely composed of people and paper. Through a combination of interviewing employees, circulating questionnaires, observations and existing documentation, the analyst comes to full understanding of the system as it is at the start of the project. This serves many purposes (Like examples?).
=== Stage 2 – Business system options ===
Having investigated the current system, the analyst must decide on the overall design of the new system. To do this, he or she, using the outputs of the previous stage, develops a set of business system options. These are different ways in which the new system could be produced varying from doing nothing to throwing out the old system entirely and building an entirely new one. The analyst may hold a brainstorming session so that as many and various ideas as possible are generated.
The ideas are then collected to options which are presented to the user. The options consider the following:
the degree of automation
the boundary between the system and the users
the distribution of the system, for example, is it centralized to one office or spread out across several?
cost/benefit
impact of the new system
Where necessary, the option will be documented with a logical data structure and a level 1 data-flow diagram.
The users and analyst together choose a single business option. This may be one of the ones already defined or may be a synthesis of different aspects of the existing options. The output of this stage is the single selected business option together with all the outputs of the feasibility stage.
=== Stage 3 – Requirements specification ===
This is probably the most complex stage in SSADM. Using the requirements developed in stage 1 and working within the framework of the selected business option, the analyst must develop a full logical specification of what the new system must do. The specification must be free from error, ambiguity and inconsistency. By logical, we mean that the specification does not say how the system will be implemented but rather describes what the system will do.
To produce the logical specification, the analyst builds the required logical models for both the data-flow diagrams (DFDs) and the Logical Data Model (LDM), consisting of the Logical Data Structure (referred to in other methods as entity relationship diagrams) and full descriptions of the data and its relationships. These are used to produce function definitions of every function which the users will require of the system, Entity Life-Histories (ELHs) which describe all events through the life of an entity, and Effect Correspondence Diagrams (ECDs) which describe how each event interacts with all relevant entities. These are continually matched against the requirements and where necessary, the requirements are added to and completed.
The product of this stage is a complete requirements specification document which is made up of:
the updated data catalogue
the updated requirements catalogue
the processing specification which in turn is made up of
user role/function matrix
function definitions
required logical data model
entity life-histories
effect correspondence diagrams
=== Stage 4 – Technical system options ===
This stage is the first towards a physical implementation of the new system application. Like the Business System Options, in this stage a large number of options for the implementation of the new system are generated. This is narrowed down to two or three to present to the user from which the final option is chosen or synthesized.
However, the considerations are quite different being:
the hardware architectures
the software to use
the cost of the implementation
the staffing required
the physical limitations such as a space occupied by the system
the distribution including any networks which that may require
the overall format of the human computer interface
All of these aspects must also conform to any constraints imposed by the business such as available money and standardization of hardware and software.
The output of this stage is a chosen technical system option.
=== Stage 5 – Logical design ===
Though the previous level specifies details of the implementation, the outputs of this stage are implementation-independent and concentrate on the requirements for the human computer interface. The logical design specifies the main methods of interaction in terms of menu structures and command structures.
One area of activity is the definition of the user dialogues. These are the main interfaces with which the users will interact with the system. Other activities are concerned with analyzing both the effects of events in updating the system and the need to make inquiries about the data on the system. Both of these use the events, function descriptions and effect correspondence diagrams produced in stage 3 to determine precisely how to update and read data in a consistent and secure way.
The product of this stage is the logical design which is made up of:
Data catalogue
Required logical data structure
Logical process model – includes dialogues and model for the update and inquiry processes
Stress & Bending moment.
=== Stage 6 – Physical design ===
This is the final stage where all the logical specifications of the system are converted to descriptions of the system in terms of real hardware and software. This is a very technical stage and a simple overview is presented here.
The logical data structure is converted into a physical architecture in terms of database structures. The exact structure of the functions and how they are implemented is specified. The physical data structure is optimized where necessary to meet size and performance requirements.
The product is a complete Physical Design which could tell software engineers how to build the system in specific details of hardware and software and to the appropriate standards.
== References ==
5. Keith Robinson, Graham Berrisford: Object-oriented SSADM, Prentice Hall International (UK), Hemel Hempstead, ISBN 0-13-309444-8
== External links ==
What is SSADM? at webopedia.com
Introduction to Methodologies and SSADM
Case study using pragmatic SSADM
Structured Analysis Wiki | Wikipedia/Structured_systems_analysis_and_design_method |
Integrated logistics support (ILS) is a technology in the system engineering to lower a product life cycle cost and decrease demand for logistics by the maintenance system optimization to ease the product support. Although originally developed for military purposes, it is also widely used in commercial customer service organisations.
== ILS defined ==
In general, ILS plans and directs the identification and development of logistics support and system requirements for military systems, with the goal of creating systems that last longer and require less support, thereby reducing costs and increasing return on investments. ILS therefore addresses these aspects of supportability not only during acquisition, but also throughout the operational life cycle of the system. The impact of ILS is often measured in terms of metrics such as reliability, availability, maintainability and testability (RAMT), and sometimes system safety (RAMS).
ILS is the integrated planning and action of a number of disciplines in concert with one another to assure system availability. The planning of each element of ILS is ideally developed in coordination with the system engineering effort and with each other. Tradeoffs may be required between elements in order to acquire a system that is: affordable (lowest life cycle cost), operable, supportable, sustainable, transportable, and environmentally sound. In some cases, a deliberate process of logistics support analysis will be used to identify tasks within each logistics support element.
The most widely accepted list of ILS activities include:
Reliability engineering, maintainability engineering and maintenance (preventive, predictive and corrective) planning
Supply (spare part) support acquire resources
Support and test equipment/equipment support
Manpower and personnel
Training and training support
Technical data/publications
Computer resources support
Facilities
Packaging, handling, storage and transportation
Design interface
Decisions are documented in a life cycle sustainment plan (LCSP), a supportability strategy, or (most commonly) an integrated logistics support plan (ILSP). ILS planning activities coincide with development of the system acquisition strategy, and the program will be tailored accordingly. A properly executed ILS strategy will ensure that the requirements for each of the elements of ILS are properly planned, resourced, and implemented. These actions will enable the system to achieve the operational readiness levels required by the warfighter at the time of fielding and throughout the life cycle. ILS can be also used for civilian projects, as highlighted by the ASD/AIA ILS guide.
It is considered common practice within some industries - primarily defence - for ILS practitioners to take a leave of absence to undertake an ILS sabbatical; furthering their knowledge of the logistics engineering disciplines. ILS Sabbaticals are normally taken in developing nations - allowing the practitioner an insight into sustainment practices in an environment of limited materiel resources.
== Adoption ==
ILS is a technique introduced by the US Army to ensure that the supportability of an equipment item is considered during its design and development. The technique was adopted by the UK MoD in 1993 and made compulsory for the procurement of the majority of MOD equipment.
Influence on design. Integrated logistic support will provide important means to identify (as early as possible) reliability issues / problems and can initiate system or part design improvements based on reliability, maintainability, testability or system availability analysis
Design of the support solution for minimum cost. Ensuring that the support solution considers and integrates the elements considered by ILS. This is discussed fully below.
Initial support package. These tasks include calculation of requirements for spare parts, special tools, and documentation. Quantities required for a specified initial period are calculated, procured, and delivered to support delivery, installation in some of the cases, and operation of the equipment.
The ILS management process facilitates specification, design, development, acquisition, test, fielding, and support of systems.
== Maintenance planning ==
Maintenance planning begins early in the acquisition process with development of the maintenance concept. It is conducted to evolve and establish requirements and tasks to be accomplished for achieving, restoring, and maintaining the operational capability for the life of the system. Maintenance planning also involves Level Of Repair Analysis (LORA) as a function of the system acquisition process. Maintenance planning will:
Define the actions and support necessary to ensure that the system attains the specified system readiness objectives with minimum life cycle cost (LCC).
Set up specific criteria for repair, including built-in test equipment (BITE) requirements, testability, reliability, and maintainability; support equipment requirements; automatic test equipment; and manpower skills and facility requirements.
State specific maintenance tasks, to be performed on the system.
Define actions and support required for fielding and marketing the system.
Address warranty considerations.
The maintenance concept must ensure prudent use of manpower and resources. When formulating the maintenance concept, analysis of the proposed work environment on the health and safety of maintenance personnel must be considered.
Conduct a LORA to optimize the support system, in terms of LCC, readiness objectives, design for discard, maintenance task distribution, support equipment and ATE, and manpower and personnel requirements.
Minimize the use of hazardous materials and the generation of waste.
== Supply support ==
Supply support encompasses all management actions, procedures, and techniques used to determine requirements to:
Acquire support items and spare parts.
Catalog the items.
Receive the items.
Store and warehouse the items.
Transfer the items to where they are needed.
Issue the items.
Dispose of secondary items.
Provide for initial support of the system.
Acquire, distribute, and replenish inventory
== Support and test equipment ==
Support and test equipment includes all equipment, mobile and fixed, that is required to perform the support functions, except that equipment which is an integral part of the system. Support equipment categories include:
Handling and maintenance equipment.
Tools (hand tools as well as power tools).
Metrology and measurement devices.
Calibration equipment.
Test equipment.
Automatic test equipment.
Support equipment for on- and off-equipment maintenance.
Special inspection equipment and depot maintenance plant equipment, which includes all equipment and tools required to assemble, disassemble, test, maintain, and support the production and/or depot repair of end items or components.
This also encompasses planning and acquisition of logistic support for this equipment.
== Manpower and personnel ==
Manpower and personnel involves identification and acquisition of personnel with skills and grades required to operate and maintain a system over its lifetime. Manpower requirements are developed and personnel assignments are made to meet support demands throughout the life cycle of the system. Manpower requirements are based on related ILS elements and other considerations. Human factors engineering (HFE) or behavioral research is frequently applied to ensure a good man-machine interface. Manpower requirements are predicated on accomplishing the logistics support mission in the most efficient
and economical way. This element includes requirements during the planning and decision process to optimize numbers, skills, and positions. This area considers:
Man-machine and environmental interface
Special skills
Human factors considerations during the planning and decision process
== Training and training devices ==
Training and training devices support encompasses the processes, procedures, techniques, training devices, and equipment used to train personnel to operate and support a system. This element defines qualitative and quantitative requirements for the training of operating and support personnel throughout the life cycle of the system. It includes requirements for:
Competencies management
Factory training
Instructor and key personnel training
New equipment training team
Resident training
Sustainment training
User training
HAZMAT disposal and safe procedures training
Embedded training devices, features, and components are designed and built into a specific system to provide training or assistance in the use of the system. (One example of this is the HELP files of many software programs.) The design, development, delivery, installation, and logistic support of required embedded training features, mockups, simulators, and training aids are also included.
== Technical data ==
Technical Data and Technical Publications consists of scientific or technical information necessary to translate system requirements into discrete engineering and logistic support documentation. Technical data is used in the development of repair manuals, maintenance manuals, user manuals, and other documents that are used to operate or support the system. Technical data includes, but may not be limited to:
Technical manuals
Technical and supply bulletins
Transportability guidance technical manuals
Maintenance expenditure limits and calibration procedures
Repair parts and tools lists
Maintenance allocation charts
Corrective maintenance instructions
Preventive maintenance and predictive maintenance instructions
Drawings/specifications/technical data packages
Software documentation
Provisioning documentation
Depot maintenance work requirements
Identification lists
Component lists
Product support data
Flight safety critical parts list for aircraft
Lifting and tie down pamphlet/references
Hazardous Material documentation
== Computer resources support ==
Computer resources support includes the facilities, hardware, software, documentation, manpower, and personnel needed to operate and support computer systems and the software within those systems. Computer resources include both stand-alone and embedded systems. This element is usually planned, developed, implemented, and monitored by a computer resources working group (CRWG) or computer resources integrated product team (CR-IPT) that documents the approach and tracks progress via a computer resources life-cycle management plan (CRLCMP). Developers will need to ensure that planning actions and strategies contained in the ILSP and CRLCMP are complementary and that computer resources support for the operational software, and ATE software, support software, is available where and when needed.
== Packaging, handling, storage, and transportation (PHS&T) ==
This element includes resources and procedures to ensure that all equipment and support items are preserved, packaged, packed, marked, handled, transported, and stored properly for short- and long-term requirements. It includes material-handling equipment and packaging, handling and storage requirements, and pre-positioning of material and parts. It also includes preservation and packaging level requirements and storage requirements (for example, sensitive, proprietary, and controlled items). This element includes planning and programming the details associated with movement of the system in its shipping configuration to the ultimate destination via transportation modes and networks available and authorized for use. It further encompasses establishment of critical engineering design parameters and constraints (e.g., width, length, height, component and system rating, and weight) that must be considered during system development. Customs requirements, air shipping requirements, rail shipping requirements, container considerations, special movement precautions, mobility, and transportation asset impact of the shipping mode or the contract shipper must be carefully assessed. PHS&T planning must consider:
System constraints (such as design specifications, item configuration, and safety precautions for hazardous material)
Special security requirements
Geographic and environmental restrictions
Special handling equipment and procedures
Impact on spare or repair parts storage requirements
Emerging PHS&T technologies, methods, or procedures and resource-intensive PHS&T procedures
Environmental impacts and constraints
== Facilities ==
The facilities logistics element is composed of a variety of planning activities, all of which are directed toward ensuring that all required permanent or semi-permanent operating and support facilities (for instance, training, field and depot maintenance, storage, operational, and testing) are available concurrently with system fielding. Planning must be comprehensive and include the need for new construction as well as modifications to existing facilities. It also includes studies to define and establish impacts on life cycle cost, funding requirements, facility locations and improvements, space requirements, environmental impacts, duration or frequency of use, safety and health standards requirements, and security restrictions. Also included are any utility requirements, for both fixed and mobile facilities, with emphasis on limiting requirements of scarce or unique resources.
== Design interface ==
Design interface is the relationship of logistics-related design parameters of the system to its projected or actual support resource requirements. These design parameters are expressed in operational terms rather than as inherent values and specifically relate to system requirements and support costs of the system. Programs such as "design for testability" and "design for discard" must be considered during system design. The basic requirements that need to be considered as part of design interface include:
Reliability
Maintainability
Standardization
Interoperability
Safety
Security
Usability
Environmental and hazmat
Privacy, particularly for computer systems
Legal
== See also ==
Reliability, availability and serviceability (computer hardware)
== References ==
The references below cover many relevant standards and handbooks related to Integrated logistics support.
=== Standards ===
Army Regulation 700-127 Integrated Logistics Support, 27 September 2007
British Defence Standard 00-600 Integrated Logistics Support for MOD Projects
Federal Standard 1037C in support of MIL-STD-188
IEEE 1332, IEEE Standard Reliability Program for the Development and Production of Electronic Systems and Equipment, Institute of Electrical and Electronics Engineers.
MIL-STD-785, Reliability Program for Systems and Equipment Development and Production, U.S. Department of Defense.
MIL-STD 1388-1A Logistic Support Analysis (LSA)
MIL-STD 1388-2B Requirements for a Logistic Support Analysis Record
MIL-STD-1629A, Procedures for Performing a Failure Mode, Effects and Criticality Analysis (FMECA)
MIL-STD-2173, Reliability Centered Maintenance Requirements, U.S. Department of Defense (superseded by NAVAIR 00-25-403)
OPNAVINST 4130.2A
DEF(AUST)5691 Logistic Support Analysis
DEF(AUST)5692 Logistic Support Analysis Record Requirements for the Australian Defence Organisation
=== Specifications - not standards ===
The ASD/AIA Suite of S-Series ILS specifications
SX000i - International guide for integrated logistic support (under development)
S1000D - International specification for technical publications using a common source database
S2000M - International specification for materiel management - Integrated data processing
S3000L - International specification for Logistics Support Analysis - LSA
S4000P - International specification for developing and continuously improving preventive maintenance
S5000F - International specification for operational and maintenance data feedback (under development)
S6000T - International specification for training needs analysis - TNA (definition on-going)
SX001G Archived 2015-09-24 at the Wayback Machine - Glossary for the Suite of S-specifications
SX002D Archived 2015-09-24 at the Wayback Machine - Common Data Model
AECMA 1000D (Technical Publications) - Refer to S1000D above
AECMA 2000M (initial provisioning) - Refer to S2000M above
DI-ILSS-80095, Data Item Description: Integrated Logistics Support Plan (ILSP) (17 Dec 1985)
=== Handbooks ===
Integrated Logistics Support Handbook, third edition - James V. Jones
MIL-HDBK-217F, Reliability Prediction of Electronic Equipment, U.S. Department of Defense Archived 2015-07-03 at the Wayback Machine.
MIL-HDBK-338B, Electronic Reliability Design Handbook, U.S. Department of Defense.
MIL-HDBK-781A, Reliability Test Methods, Plans, and Environments for Engineering Development, Qualification, and Production, U.S. Department of Defense.
NASA Probabilistic Risk Assessment Handbook
NASA Fault Tree Assessment handbook
MIL-HDBK-2155, Failure Reporting, Analysis and Corrective Action Taken, U.S. Department of Defense
MIL-HDBK-502A, Product Support Analysis, U.S. Department of Defense Archived 2013-12-24 at the Wayback Machine
== Resources ==
Systems Assessments, Integrated Logistics and COOP Support Services, 26 August 2008
AeroSpace and Defence (ASD) Industries Association of Europe
Integrated Logistics Support, The Design Engineering Link by Walter Finkelstein, J.A. Richard Guertin, 1989, ISBN 978-1854230119
== Article references == | Wikipedia/Integrated_logistics_support |
Modeling and simulation (M&S) is the use of models (e.g., physical, mathematical, behavioral, or logical representation of a system, entity, phenomenon, or process) as a basis for simulations to develop data utilized for managerial or technical decision making.
In the computer application of modeling and simulation a computer is used to build a mathematical model which contains key parameters of the physical model. The mathematical model represents the physical model in virtual form, and conditions are applied that set up the experiment of interest. The simulation starts – i.e., the computer calculates the results of those conditions on the mathematical model – and outputs results in a format that is either machine- or human-readable, depending upon the implementation.
The use of M&S within engineering is well recognized. Simulation technology belongs to the tool set of engineers of all application domains and has been included in the body of knowledge of engineering management. M&S helps to reduce costs, increase the quality of products and systems, and document and archive lessons learned. Because the results of a simulation are only as good as the underlying model(s), engineers, operators, and analysts must pay particular attention to its construction. To ensure that the results of the simulation are applicable to the real world, the user must understand the assumptions, conceptualizations, and constraints of its implementation. Additionally, models may be updated and improved using results of actual experiments. M&S is a discipline on its own. Its many application domains often lead to the assumption that M&S is a pure application. This is not the case and needs to be recognized by engineering management in the application of M&S.
The use of such mathematical models and simulations avoids actual experimentation, which can be costly and time-consuming. Instead, mathematical knowledge and computational power is used to solve real-world problems cheaply and in a time efficient manner. As such, M&S can facilitate understanding a system's behavior without actually testing the system in the real world. For example, to determine which type of spoiler would improve traction the most while designing a race car, a computer simulation of the car could be used to estimate the effect of different spoiler shapes on the coefficient of friction in a turn. Useful insights about different decisions in the design could be gleaned without actually building the car. In addition, simulation can support experimentation that occurs totally in software, or in human-in-the-loop environments where simulation represents systems or generates data needed to meet experiment objectives. Furthermore, simulation can be used to train persons using a virtual environment that would otherwise be difficult or expensive to produce.
== Interest in simulations ==
Technically, simulation is well accepted. The 2006 National Science Foundation (NSF) Report on "Simulation-based Engineering Science" showed the potential of using simulation technology and methods to revolutionize the engineering science. Among the reasons for the steadily increasing interest in simulation applications are the following:
Using simulations is generally cheaper, safer and sometimes more ethical than conducting real-world experiments. For example, supercomputers are sometimes used to simulate the detonation of nuclear devices and their effects in order to support better preparedness in the event of a nuclear explosion. Similar efforts are conducted to simulate hurricanes and other natural catastrophes.
Simulations can often be even more realistic than traditional experiments, as they allow the free configuration of the realistic range of environment parameters found in the operational application field of the final product. Examples are supporting deep water operation of the US Navy or the simulating the surface of neighbored planets in preparation of NASA missions.
Simulations can often be conducted faster than real time. This allows using them for efficient if-then-else analyses of different alternatives, in particular when the necessary data to initialize the simulation can easily be obtained from operational data. This use of simulation adds decision support simulation systems to the tool box of traditional decision support systems.
Simulations allow setting up a coherent synthetic environment that allows for integration of simulated systems in the early analysis phase via mixed virtual systems with first prototypical components to a virtual test environment for the final system. If managed correctly, the environment can be migrated from the development and test domain to the training and education domain in follow-on life cycle phases for the systems (including the option to train and optimize a virtual twin of the real system under realistic constraints even before first components are being built).
The military and defense domain, in particular within the United States, has been the main M&S champion, in form of funding as well as application of M&S. E.g., M&S in modern military organizations is part of the acquisition/procurement strategy. Specifically, M&S is used to conduct Events and Experiments that influence requirements and training for military systems. As such, M&S is considered an integral part of systems engineering of military systems. Other application domains, however, are currently catching up. M&S in the fields of medicine, transportation, and other industries is poised to rapidly outstrip DoD's use of M&S in the years ahead, if it hasn't already happened.
== Simulation in science ==
Modeling and simulation are important in research. Representing the real systems either via physical reproductions at smaller scale, or via mathematical models that allow representing the dynamics of the system via simulation, allows exploring system behavior in an articulated way which is often either not possible, or too risky in the real world.
== As an emerging discipline ==
"The emerging discipline of M&S is based on developments in diverse computer science areas as well as influenced by developments in Systems Theory, Systems Engineering, Software Engineering, Artificial Intelligence, and more. This foundation is as diverse as that of engineering management and brings elements of art, engineering, and science together in a complex and unique way that requires domain experts to enable appropriate decisions when it comes to application or development of M&S technology in the context of this paper. The diversity and application-oriented nature of this new discipline sometimes result in the challenge, that the supported application domains themselves already have vocabularies in place that are not necessarily aligned between disjunctive domains. A comprehensive and concise representation of concepts, terms, and activities is needed that make up a professional Body of Knowledge for the M&S discipline. Due to the broad variety of contributors, this process is still ongoing."
Padilla et al. recommend in "Do we Need M&S Science" to distinguish between M&S Science, Engineering, and Applications.
M&S Science contributes to the Theory of M&S, defining the academic foundations of the discipline.
M&S Engineering is rooted in Theory but looks for applicable solution patterns. The focus is general methods that can be applied in various problem domains.
M&S Applications solve real world problems by focusing on solutions using M&S. Often, the solution results from applying a method, but many solutions are very problem domain specific and are derived from problem domain expertise and not from any general M&S theory or method.
Models can be composed of different units (models at finer granularity) linked to achieving a specific goal; for this reason they can be also called modeling solutions.
More generally, modeling and simulation is a key enabler for systems engineering activities as the system representation in a computer readable (and possibly executable) model enables engineers to reproduce the system (or Systems of System) behavior. A collection of applicative modeling and simulation method to support systems engineering activities in provided in.
== Application domains ==
There are many categorizations possible, but the following taxonomy has been very successfully used in the defense domain, and is currently applied to medical simulation and transportation simulation as well.
Analyses Support is conducted in support of planning and experimentation. Very often, the search for an optimal solution that shall be implemented is driving these efforts. What-if analyses of alternatives fall into this category as well. This style of work is often accomplished by simulysts - those having skills in both simulation and as analysts. This blending of simulation and analyst is well noted in Kleijnen.
Systems Engineering Support is applied for the procurement, development, and testing of systems. This support can start in early phases and include topics like executable system architectures, and it can support testing by providing a virtual environment in which tests are conducted. This style of work is often accomplished by engineers and architects.
Training and Education Support provides simulators, virtual training environments, and serious games to train and educate people. This style of work is often accomplished by trainers working in concert with computer scientists.
A special use of Analyses Support is applied to ongoing business operations. Traditionally, decision support systems provide this functionality. Simulation systems improve their functionality by adding the dynamic element and allow to compute estimates and predictions, including optimization and what-if analyses.
== Individual concepts ==
Although the terms "modeling" and "simulation" are often used as synonyms within disciplines applying M&S exclusively as a tool, within the discipline of M&S both are treated as individual and equally important concepts. Modeling is understood as the purposeful abstraction of reality, resulting in the formal specification of a conceptualization and underlying assumptions and constraints. M&S is in particular interested in models that are used to support the implementation of an executable version on a computer. The execution of a model over time is understood as the simulation. While modeling targets the conceptualization, simulation challenges mainly focus on implementation, in other words, modeling resides on the abstraction level, whereas simulation resides on the implementation level.
Conceptualization and implementation – modeling and simulation – are two activities that are mutually dependent, but can nonetheless be conducted by separate individuals. Management and engineering knowledge and guidelines are needed to ensure that they are well connected. Like an engineering management professional in systems engineering needs to make sure that the systems design captured in a systems architecture is aligned with the systems development, this task needs to be conducted with the same level of professionalism for the model that has to be implemented as well. As the role of big data and analytics continues to grow, the role of combined simulation of analysis is the realm of yet another professional called a simplest – in order to blend algorithmic and analytic techniques through visualizations available directly to decision makers. A study designed for the Bureau of Labor and Statistics by Lee et al. provides an interesting look at how bootstrap techniques (statistical analysis) were used with simulation to generate population data where there existed none.
== Academic programs ==
Modeling and Simulation has only recently become an academic discipline of its own. Formerly, those working in the field usually had a background in engineering.
The following institutions offer degrees in Modeling and Simulation:
Ph D. Programs
University of Pennsylvania (Philadelphia, PA)
Old Dominion University (Norfolk, VA)
University of Alabama in Huntsville (Huntsville, AL)
University of Central Florida (Orlando, FL)
Naval Postgraduate School (Monterey, CA)
University of Genoa (Genoa, Italy)
Masters Programs
National University of Science and Technology, Pakistan (Islamabad, Pakistan)
Arizona State University (Tempe, AZ)
Old Dominion University (Norfolk, VA)
University of Central Florida (Orlando, FL)
the University of Alabama in Huntsville (Huntsville, AL)
Middle East Technical University (Ankara, Turkey)
University of New South Wales (Australia)
Naval Postgraduate School (Monterey, CA)
Department of Scientific Computing, Modeling and Simulation (M.Tech (Modelling & Simulation)) (Savitribai Phule Pune University, India)
Columbus State University (Columbus, GA)
Purdue University Calumet (Hammond, IN)
Delft University of Technology (Delft, The Netherlands)
University of Genoa (Genoa, Italy)
Hamburg University of Applied Sciences (Hamburg, Germany)
Professional Science Masters Programs
University of Central Florida (Orlando, FL)
Graduate Certificate Programs
Portland State University Systems Science
Columbus State University (Columbus, GA)
the University of Alabama in Huntsville (Huntsville, AL)
Undergraduate Programs
Old Dominion University (Norfolk, VA)
Ghulam Ishaq Khan Institute of Engineering Sciences and Technology (Swabi, Pakistan)
== Modeling and Simulation Body of Knowledge ==
The Modeling and Simulation Body of Knowledge (M&S BoK) is the domain of knowledge (information) and capability (competency) that identifies the modeling and simulation community of practice and the M&S profession, industry, and market.
The M&S BoK Index is a set of pointers providing handles so that subject information content can be denoted, identified, accessed, and manipulated.
== Summary ==
Three activities have to be conducted and orchestrated to ensure success:
a model must be produced that captures formally the conceptualization,
a simulation must implement this model, and
management must ensure that model and simulation are interconnected and on the current state (which means that normally the model needs to be updated in case the simulation is changed as well).
== See also ==
== References ==
Master of Science, Purdue University Calumet. "Modeling, Simulation and Visualization". Archived from the original on 2014-10-08. Retrieved 2014-10-08.
== Further reading ==
The Springer Publishing House publishes the Simulation Foundations, Methods, and Applications Series [1].
Recently, Wiley started their own Series on Modeling and Simulation.
== External links ==
US Department of Defense (DoD) Modeling and Simulation Coordination Office (M&SCO)
MODSIM World Conference
Society for Modeling and Simulation
Association for Computing Machinery (ACM) Special Interest Group (SIG) on SImulation and Modeling (SIM)
US Congressional Modeling and Simulation Caucus
Example of an M&S BoK Index developed by Tuncer Ören
SimSummit collaborative environment supporting an M&S BoK | Wikipedia/Modeling_and_simulation |
Processor design is a subfield of computer science and computer engineering (fabrication) that deals with creating a processor, a key component of computer hardware.
The design process involves choosing an instruction set and a certain execution paradigm (e.g. VLIW or RISC) and results in a microarchitecture, which might be described in e.g. VHDL or Verilog. For microprocessor design, this description is then manufactured employing some of the various semiconductor device fabrication processes, resulting in a die which is bonded onto a chip carrier. This chip carrier is then soldered onto, or inserted into a socket on, a printed circuit board (PCB).
The mode of operation of any processor is the execution of lists of instructions. Instructions typically include those to compute or manipulate data values using registers, change or retrieve values in read/write memory, perform relational tests between data values and to control program flow.
Processor designs are often tested and validated on one or several FPGAs before sending the design of the processor to a foundry for semiconductor fabrication.
== Details ==
=== Basics ===
CPU design is divided into multiple components. Information is transferred through datapaths (such as ALUs and pipelines). These datapaths are controlled through logic by control units. Memory components include register files and caches to retain information, or certain actions. Clock circuitry maintains internal rhythms and timing through clock drivers, PLLs, and clock distribution networks. Pad transceiver circuitry which allows signals to be received and sent and a logic gate cell library which is used to implement the logic. Logic gates are the foundation for processor design as they are used to implement most of the processor's components.
CPUs designed for high-performance markets might require custom (optimized or application specific (see below)) designs for each of these items to achieve frequency, power-dissipation, and chip-area goals whereas CPUs designed for lower performance markets might lessen the implementation burden by acquiring some of these items by purchasing them as intellectual property. Control logic implementation techniques (logic synthesis using CAD tools) can be used to implement datapaths, register files, and clocks. Common logic styles used in CPU design include unstructured random logic, finite-state machines, microprogramming (common from 1965 to 1985), and Programmable logic arrays (common in the 1980s, no longer common).
=== Implementation logic ===
Device types used to implement the logic include:
Individual vacuum tubes, individual transistors and semiconductor diodes, and transistor-transistor logic small-scale integration logic chips – no longer used for CPUs
Programmable array logic and programmable logic devices – no longer used for CPUs
Emitter-coupled logic (ECL) gate arrays – no longer common
CMOS gate arrays – no longer used for CPUs
CMOS mass-produced ICs – the vast majority of CPUs by volume
CMOS ASICs – only for a minority of special applications due to expense
Field-programmable gate arrays (FPGA) – common for soft microprocessors, and more or less required for reconfigurable computing
A CPU design project generally has these major tasks:
Programmer-visible instruction set architecture, which can be implemented by a variety of microarchitectures
Architectural study and performance modeling in ANSI C/C++ or SystemC
High-level synthesis (HLS) or register transfer level (RTL, e.g. logic) implementation
RTL verification
Circuit design of speed critical components (caches, registers, ALUs)
Logic synthesis or logic-gate-level design
Timing analysis to confirm that all logic and circuits will run at the specified operating frequency
Physical design including floorplanning, place and route of logic gates
Checking that RTL, gate-level, transistor-level and physical-level representations are equivalent
Checks for signal integrity, chip manufacturability
Re-designing a CPU core to a smaller die area helps to shrink everything (a "photomask shrink"), resulting in the same number of transistors on a smaller die. It improves performance (smaller transistors switch faster), reduces power (smaller wires have less parasitic capacitance) and reduces cost (more CPUs fit on the same wafer of silicon). Releasing a CPU on the same size die, but with a smaller CPU core, keeps the cost about the same but allows higher levels of integration within one very-large-scale integration chip (additional cache, multiple CPUs or other components), improving performance and reducing overall system cost.
As with most complex electronic designs, the logic verification effort (proving that the design does not have bugs) now dominates the project schedule of a CPU.
Key CPU architectural innovations include index register, cache, virtual memory, instruction pipelining, superscalar, CISC, RISC, virtual machine, emulators, microprogram, and stack.
=== Microarchitectural concepts ===
=== Research topics ===
A variety of new CPU design ideas have been proposed,
including reconfigurable logic, clockless CPUs, computational RAM, and optical computing.
=== Performance analysis and benchmarking ===
Benchmarking is a way of testing CPU speed. Examples include SPECint and SPECfp, developed by Standard Performance Evaluation Corporation, and ConsumerMark developed by the Embedded Microprocessor Benchmark Consortium EEMBC.
Some of the commonly used metrics include:
Instructions per second - Most consumers pick a computer architecture (normally Intel IA32 architecture) to be able to run a large base of pre-existing pre-compiled software. Being relatively uninformed on computer benchmarks, some of them pick a particular CPU based on operating frequency (see Megahertz Myth).
FLOPS - The number of floating point operations per second is often important in selecting computers for scientific computations.
Performance per watt - System designers building parallel computers, such as Google, pick CPUs based on their speed per watt of power, because the cost of powering the CPU outweighs the cost of the CPU itself.
Some system designers building parallel computers pick CPUs based on the speed per dollar.
System designers building real-time computing systems want to guarantee worst-case response. That is easier to do when the CPU has low interrupt latency and when it has deterministic response. (DSP)
Computer programmers who program directly in assembly language want a CPU to support a full featured instruction set.
Low power - For systems with limited power sources (e.g. solar, batteries, human power).
Small size or low weight - for portable embedded systems, systems for spacecraft.
Environmental impact - Minimizing environmental impact of computers during manufacturing and recycling as well during use. Reducing waste, reducing hazardous materials. (see Green computing).
There may be tradeoffs in optimizing some of these metrics. In particular, many design techniques that make a CPU run faster make the "performance per watt", "performance per dollar", and "deterministic response" much worse, and vice versa.
== Markets ==
There are several different markets in which CPUs are used. Since each of these markets differ in their requirements for CPUs, the devices designed for one market are in most cases inappropriate for the other markets.
=== General-purpose computing ===
As of 2010, in the general-purpose computing market, that is, desktop, laptop, and server computers commonly used in businesses and homes, the Intel IA-32 and the 64-bit version x86-64 architecture dominate the market, with its rivals PowerPC and SPARC maintaining much smaller customer bases. Yearly, hundreds of millions of IA-32 architecture CPUs are used by this market. A growing percentage of these processors are for mobile implementations such as netbooks and laptops.
Since these devices are used to run countless different types of programs, these CPU designs are not specifically targeted at one type of application or one function. The demands of being able to run a wide range of programs efficiently has made these CPU designs among the more advanced technically, along with some disadvantages of being relatively costly, and having high power consumption.
==== High-end processor economics ====
In 1984, most high-performance CPUs required four to five years to develop.
=== Scientific computing ===
Scientific computing is a much smaller niche market (in revenue and units shipped). It is used in government research labs and universities. Before 1990, CPU design was often done for this market, but mass market CPUs organized into large clusters have proven to be more affordable. The main remaining area of active hardware design and research for scientific computing is for high-speed data transmission systems to connect mass market CPUs.
=== Embedded design ===
As measured by units shipped, most CPUs are embedded in other machinery, such as telephones, clocks, appliances, vehicles, and infrastructure. Embedded processors sell in the volume of many billions of units per year, however, mostly at much lower price points than that of the general purpose processors.
These single-function devices differ from the more familiar general-purpose CPUs in several ways:
Low cost is of high importance.
It is important to maintain a low power dissipation as embedded devices often have a limited battery life and it is often impractical to include cooling fans.
To give lower system cost, peripherals are integrated with the processor on the same silicon chip.
Keeping peripherals on-chip also reduces power consumption as external GPIO ports typically require buffering so that they can source or sink the relatively high current loads that are required to maintain a strong signal outside of the chip.
Many embedded applications have a limited amount of physical space for circuitry; keeping peripherals on-chip will reduce the space required for the circuit board.
The program and data memories are often integrated on the same chip. When the only allowed program memory is ROM, the device is known as a microcontroller.
For many embedded applications, interrupt latency will be more critical than in some general-purpose processors.
==== Embedded processor economics ====
The embedded CPU family with the largest number of total units shipped is the 8051, averaging nearly a billion units per year. The 8051 is widely used because it is very inexpensive. The design time is now roughly zero, because it is widely available as commercial intellectual property. It is now often embedded as a small part of a larger system on a chip. The silicon cost of an 8051 is now as low as US$0.001, because some implementations use as few as 2,200 logic gates and take 0.4730 square millimeters of silicon.
As of 2009, more CPUs are produced using the ARM architecture family instruction sets than any other 32-bit instruction set.
The ARM architecture and the first ARM chip were designed in about one and a half years and 5 human years of work time.
The 32-bit Parallax Propeller microcontroller architecture and the first chip were designed by two people in about 10 human years of work time.
The 8-bit AVR architecture and first AVR microcontroller was conceived and designed by two students at the Norwegian Institute of Technology.
The 8-bit 6502 architecture and the first MOS Technology 6502 chip were designed in 13 months by a group of about 9 people.
==== Research and educational CPU design ====
The 32-bit Berkeley RISC I and RISC II processors were mostly designed by a series of students as part of a four quarter sequence of graduate courses.
This design became the basis of the commercial SPARC processor design.
For about a decade, every student taking the 6.004 class at MIT was part of a team—each team had one semester to design and build a simple 8 bit CPU out of 7400 series integrated circuits.
One team of 4 students designed and built a simple 32 bit CPU during that semester.
Some undergraduate courses require a team of 2 to 5 students to design, implement, and test a simple CPU in a FPGA in a single 15-week semester.
The MultiTitan CPU was designed with 2.5 man years of effort, which was considered "relatively little design effort" at the time.
24 people contributed to the 3.5 year MultiTitan research project, which included designing and building a prototype CPU.
==== Soft microprocessor cores ====
For embedded systems, the highest performance levels are often not needed or desired due to the power consumption requirements. This allows for the use of processors which can be totally implemented by logic synthesis techniques. These synthesized processors can be implemented in a much shorter amount of time, giving quicker time-to-market.
== See also ==
Amdahl's law
Central processing unit
Comparison of instruction set architectures
Complex instruction set computer
CPU cache
Electronic design automation
Heterogeneous computing
High-level synthesis
History of general-purpose CPUs
Integrated circuit design
Microarchitecture
Microprocessor
Minimal instruction set computer
Moore's law
Reduced instruction set computer
System on a chip
Network on a chip
Process design kit – a set of documents created or accumulated for a semiconductor device production process
Uncore
== References ==
=== General references ===
Hwang, Enoch (2006). Digital Logic and Microprocessor Design with VHDL. Thomson. ISBN 0-534-46593-5.
Processor Design: An Introduction | Wikipedia/Microprocessor_design |
Systems engineering is an interdisciplinary field of engineering and engineering management that focuses on how to design, integrate, and manage complex systems over their life cycles. At its core, systems engineering utilizes systems thinking principles to organize this body of knowledge. The individual outcome of such efforts, an engineered system, can be defined as a combination of components that work in synergy to collectively perform a useful function.
Issues such as requirements engineering, reliability, logistics, coordination of different teams, testing and evaluation, maintainability, and many other disciplines, aka "ilities", necessary for successful system design, development, implementation, and ultimate decommission become more difficult when dealing with large or complex projects. Systems engineering deals with work processes, optimization methods, and risk management tools in such projects. It overlaps technical and human-centered disciplines such as industrial engineering, production systems engineering, process systems engineering, mechanical engineering, manufacturing engineering, production engineering, control engineering, software engineering, electrical engineering, cybernetics, aerospace engineering, organizational studies, civil engineering and project management. Systems engineering ensures that all likely aspects of a project or system are considered and integrated into a whole.
The systems engineering process is a discovery process that is quite unlike a manufacturing process. A manufacturing process is focused on repetitive activities that achieve high-quality outputs with minimum cost and time. The systems engineering process must begin by discovering the real problems that need to be resolved and identifying the most probable or highest-impact failures that can occur. Systems engineering involves finding solutions to these problems.
== History ==
The term systems engineering can be traced back to Bell Telephone Laboratories in the 1940s. The need to identify and manipulate the properties of a system as a whole, which in complex engineering projects may greatly differ from the sum of the parts' properties, motivated various industries, especially those developing systems for the U.S. military, to apply the discipline.
When it was no longer possible to rely on design evolution to improve upon a system and the existing tools were not sufficient to meet growing demands, new methods began to be developed that addressed the complexity directly. The continuing evolution of systems engineering comprises the development and identification of new methods and modeling techniques. These methods aid in a better comprehension of the design and developmental control of engineering systems as they grow more complex. Popular tools that are often used in the systems engineering context were developed during these times, including Universal Systems Language (USL), Unified Modeling Language (UML), Quality function deployment (QFD), and Integration Definition (IDEF).
In 1990, a professional society for systems engineering, the National Council on Systems Engineering (NCOSE), was founded by representatives from a number of U.S. corporations and organizations. NCOSE was created to address the need for improvements in systems engineering practices and education. As a result of growing involvement from systems engineers outside of the U.S., the name of the organization was changed to the International Council on Systems Engineering (INCOSE) in 1995. Schools in several countries offer graduate programs in systems engineering, and continuing education options are also available for practicing engineers.
== Concept ==
Systems engineering signifies only an approach and, more recently, a discipline in engineering. The aim of education in systems engineering is to formalize various approaches simply and in doing so, identify new methods and research opportunities similar to that which occurs in other fields of engineering. As an approach, systems engineering is holistic and interdisciplinary in flavor.
=== Origins and traditional scope ===
The traditional scope of engineering embraces the conception, design, development, production, and operation of physical systems. Systems engineering, as originally conceived, falls within this scope. "Systems engineering", in this sense of the term, refers to the building of engineering concepts.
=== Evolution to a broader scope ===
The use of the term "systems engineer" has evolved over time to embrace a wider, more holistic concept of "systems" and of engineering processes. This evolution of the definition has been a subject of ongoing controversy, and the term continues to apply to both the narrower and a broader scope.
Traditional systems engineering was seen as a branch of engineering in the classical sense, that is, as applied only to physical systems, such as spacecraft and aircraft. More recently, systems engineering has evolved to take on a broader meaning especially when humans were seen as an essential component of a system. Peter Checkland, for example, captures the broader meaning of systems engineering by stating that 'engineering' "can be read in its general sense; you can engineer a meeting or a political agreement.": 10
Consistent with the broader scope of systems engineering, the Systems Engineering Body of Knowledge (SEBoK) has defined three types of systems engineering:
Product Systems Engineering (PSE) is the traditional systems engineering focused on the design of physical systems consisting of hardware and software.
Enterprise Systems Engineering (ESE) pertains to the view of enterprises, that is, organizations or combinations of organizations, as systems.
Service Systems Engineering (SSE) has to do with the engineering of service systems. Checkland defines a service system as a system which is conceived as serving another system. Most civil infrastructure systems are service systems.
=== Holistic view ===
Systems engineering focuses on analyzing and eliciting customer needs and required functionality early in the development cycle, documenting requirements, then proceeding with design synthesis and system validation while considering the complete problem, the system lifecycle. This includes fully understanding all of the stakeholders involved. Oliver et al. claim that the systems engineering process can be decomposed into:
A Systems Engineering Technical Process
A Systems Engineering Management Process
Within Oliver's model, the goal of the Management Process is to organize the technical effort in the lifecycle, while the Technical Process includes assessing available information, defining effectiveness measures, to create a behavior model, create a structure model, perform trade-off analysis, and create sequential build & test plan.
Depending on their application, although there are several models that are used in the industry, all of them aim to identify the relation between the various stages mentioned above and incorporate feedback. Examples of such models include the Waterfall model and the VEE model (also called the V model).
=== Interdisciplinary field ===
System development often requires contribution from diverse technical disciplines. By providing a systems (holistic) view of the development effort, systems engineering helps mold all the technical contributors into a unified team effort, forming a structured development process that proceeds from concept to production to operation and, in some cases, to termination and disposal. In an acquisition, the holistic integrative discipline combines contributions and balances tradeoffs among cost, schedule, and performance while maintaining an acceptable level of risk covering the entire life cycle of the item.
This perspective is often replicated in educational programs, in that systems engineering courses are taught by faculty from other engineering departments, which helps create an interdisciplinary environment.
=== Managing complexity ===
The need for systems engineering arose with the increase in complexity of systems and projects, in turn exponentially increasing the possibility of component friction, and therefore the unreliability of the design. When speaking in this context, complexity incorporates not only engineering systems but also the logical human organization of data. At the same time, a system can become more complex due to an increase in size as well as with an increase in the amount of data, variables, or the number of fields that are involved in the design. The International Space Station is an example of such a system.
The development of smarter control algorithms, microprocessor design, and analysis of environmental systems also come within the purview of systems engineering. Systems engineering encourages the use of tools and methods to better comprehend and manage complexity in systems. Some examples of these tools can be seen here:
System architecture
System model, modeling, and simulation
Mathematical optimization
System dynamics
Systems analysis
Statistical analysis
Reliability engineering
Decision making
Taking an interdisciplinary approach to engineering systems is inherently complex since the behavior of and interaction among system components is not always immediately well defined or understood. Defining and characterizing such systems and subsystems and the interactions among them is one of the goals of systems engineering. In doing so, the gap that exists between informal requirements from users, operators, marketing organizations, and technical specifications is successfully bridged.
=== Scope ===
The principles of systems engineering – holism, emergent behavior, boundary, et al. – can be applied to any system, complex or otherwise, provided systems thinking is employed at all levels. Besides defense and aerospace, many information and technology-based companies, software development firms, and industries in the field of electronics & communications require systems engineers as part of their team.
An analysis by the INCOSE Systems Engineering Center of Excellence (SECOE) indicates that optimal effort spent on systems engineering is about 15–20% of the total project effort. At the same time, studies have shown that systems engineering essentially leads to a reduction in costs among other benefits. However, no quantitative survey at a larger scale encompassing a wide variety of industries has been conducted until recently. Such studies are underway to determine the effectiveness and quantify the benefits of systems engineering.
Systems engineering encourages the use of modeling and simulation to validate assumptions or theories on systems and the interactions within them.
Use of methods that allow early detection of possible failures, in safety engineering, are integrated into the design process. At the same time, decisions made at the beginning of a project whose consequences are not clearly understood can have enormous implications later in the life of a system, and it is the task of the modern systems engineer to explore these issues and make critical decisions. No method guarantees today's decisions will still be valid when a system goes into service years or decades after first conceived. However, there are techniques that support the process of systems engineering. Examples include soft systems methodology, Jay Wright Forrester's System dynamics method, and the Unified Modeling Language (UML)—all currently being explored, evaluated, and developed to support the engineering decision process.
== Education ==
Education in systems engineering is often seen as an extension to the regular engineering courses, reflecting the industry attitude that engineering students need a foundational background in one of the traditional engineering disciplines (e.g. aerospace engineering, civil engineering, electrical engineering, mechanical engineering, manufacturing engineering, industrial engineering, chemical engineering)—plus practical, real-world experience to be effective as systems engineers. Undergraduate university programs explicitly in systems engineering are growing in number but remain uncommon, the degrees including such material are most often presented as a BS in Industrial Engineering. Typically programs (either by themselves or in combination with interdisciplinary study) are offered beginning at the graduate level in both academic and professional tracks, resulting in the grant of either a MS/MEng or Ph.D./EngD degree.
INCOSE, in collaboration with the Systems Engineering Research Center at Stevens Institute of Technology maintains a regularly updated directory of worldwide academic programs at suitably accredited institutions. As of 2017, it lists over 140 universities in North America offering more than 400 undergraduate and graduate programs in systems engineering. Widespread institutional acknowledgment of the field as a distinct subdiscipline is quite recent; the 2009 edition of the same publication reported the number of such schools and programs at only 80 and 165, respectively.
Education in systems engineering can be taken as systems-centric or domain-centric:
Systems-centric programs treat systems engineering as a separate discipline and most of the courses are taught focusing on systems engineering principles and practice.
Domain-centric programs offer systems engineering as an option that can be exercised with another major field in engineering.
Both of these patterns strive to educate the systems engineer who is able to oversee interdisciplinary projects with the depth required of a core engineer.
== Systems engineering topics ==
Systems engineering tools are strategies, procedures, and techniques that aid in performing systems engineering on a project or product. The purpose of these tools varies from database management, graphical browsing, simulation, and reasoning, to document production, neutral import/export, and more.
=== System ===
There are many definitions of what a system is in the field of systems engineering. Below are a few authoritative definitions:
ANSI/EIA-632-1999: "An aggregation of end products and enabling products to achieve a given purpose."
DAU Systems Engineering Fundamentals: "an integrated composite of people, products, and processes that provide a capability to satisfy a stated need or objective."
IEEE Std 1220-1998: "A set or arrangement of elements and processes that are related and whose behavior satisfies customer/operational needs and provides for life cycle sustainment of the products."
INCOSE Systems Engineering Handbook: "homogeneous entity that exhibits predefined behavior in the real world and is composed of heterogeneous parts that do not individually exhibit that behavior and an integrated configuration of components and/or subsystems."
INCOSE: "A system is a construct or collection of different elements that together produce results not obtainable by the elements alone. The elements, or parts, can include people, hardware, software, facilities, policies, and documents; that is, all things required to produce systems-level results. The results include system-level qualities, properties, characteristics, functions, behavior, and performance. The value added by the system as a whole, beyond that contributed independently by the parts, is primarily created by the relationship among the parts; that is, how they are interconnected."
ISO/IEC 15288:2008: "A combination of interacting elements organized to achieve one or more stated purposes."
NASA Systems Engineering Handbook: "(1) The combination of elements that function together to produce the capability to meet a need. The elements include all hardware, software, equipment, facilities, personnel, processes, and procedures needed for this purpose. (2) The end product (which performs operational functions) and enabling products (which provide life-cycle support services to the operational end products) that make up a system."
=== Systems engineering processes ===
Systems engineering processes encompass all creative, manual, and technical activities necessary to define the product and which need to be carried out to convert a system definition to a sufficiently detailed system design specification for product manufacture and deployment. Design and development of a system can be divided into four stages, each with different definitions:
Task definition (informative definition)
Conceptual stage (cardinal definition)
Design stage (formative definition)
Implementation stage (manufacturing definition)
Depending on their application, tools are used for various stages of the systems engineering process:
=== Using models ===
Models play important and diverse roles in systems engineering. A model can be defined in several
ways, including:
An abstraction of reality designed to answer specific questions about the real world
An imitation, analog, or representation of a real-world process or structure; or
A conceptual, mathematical, or physical tool to assist a decision-maker.
Together, these definitions are broad enough to encompass physical engineering models used in the verification of a system design, as well as schematic models like a functional flow block diagram and mathematical (i.e. quantitative) models used in the trade study process. This section focuses on the last.
The main reason for using mathematical models and diagrams in trade studies is to provide estimates of system effectiveness, performance or technical attributes, and cost from a set of known or estimable quantities. Typically, a collection of separate models is needed to provide all of these outcome variables. The heart of any mathematical model is a set of meaningful quantitative relationships among its inputs and outputs. These relationships can be as simple as adding up constituent quantities to obtain a total, or as complex as a set of differential equations describing the trajectory of a spacecraft in a gravitational field. Ideally, the relationships express causality, not just correlation. Furthermore, key to successful systems engineering activities are also the methods with which these models are efficiently and effectively managed and used to simulate the systems. However, diverse domains often present recurring problems of modeling and simulation for systems engineering, and new advancements are aiming to cross-fertilize methods among distinct scientific and engineering communities, under the title of 'Modeling & Simulation-based Systems Engineering'.
=== Modeling formalisms and graphical representations ===
Initially, when the primary purpose of a systems engineer is to comprehend a complex problem, graphic representations of a system are used to communicate a system's functional and data requirements. Common graphical representations include:
Functional flow block diagram (FFBD)
Model-based design
Data flow diagram (DFD)
N2 chart
IDEF0 diagram
Use case diagram
Sequence diagram
Block diagram
Signal-flow graph
USL function maps and type maps
Enterprise architecture frameworks
A graphical representation relates the various subsystems or parts of a system through functions, data, or interfaces. Any or each of the above methods is used in an industry based on its requirements. For instance, the N2 chart may be used where interfaces between systems are important. Part of the design phase is to create structural and behavioral models of the system.
Once the requirements are understood, it is now the responsibility of a systems engineer to refine them and to determine, along with other engineers, the best technology for a job. At this point starting with a trade study, systems engineering encourages the use of weighted choices to determine the best option. A decision matrix, or Pugh method, is one way (QFD is another) to make this choice while considering all criteria that are important. The trade study in turn informs the design, which again affects graphic representations of the system (without changing the requirements). In an SE process, this stage represents the iterative step that is carried out until a feasible solution is found. A decision matrix is often populated using techniques such as statistical analysis, reliability analysis, system dynamics (feedback control), and optimization methods.
=== Other tools ===
==== Systems Modeling Language ====
Systems Modeling Language (SysML), a modeling language used for systems engineering applications, supports the specification, analysis, design, verification and validation of a broad range of complex systems.
==== Lifecycle Modeling Language ====
Lifecycle Modeling Language (LML), is an open-standard modeling language designed for systems engineering that supports the full lifecycle: conceptual, utilization, support, and retirement stages.
== Related fields and sub-fields ==
Many related fields may be considered tightly coupled to systems engineering. The following areas have contributed to the development of systems engineering as a distinct entity:
=== Cognitive systems engineering ===
Cognitive systems engineering (CSE) is a specific approach to the description and analysis of human-machine systems or sociotechnical systems. The three main themes of CSE are how humans cope with complexity, how work is accomplished by the use of artifacts, and how human-machine systems and socio-technical systems can be described as joint cognitive systems. CSE has since its beginning become a recognized scientific discipline, sometimes also referred to as cognitive engineering. The concept of a Joint Cognitive System (JCS) has in particular become widely used as a way of understanding how complex socio-technical systems can be described with varying degrees of resolution. The more than 20 years of experience with CSE has been described extensively.
=== Configuration management ===
Like systems engineering, configuration management as practiced in the defense and aerospace industry is a broad systems-level practice. The field parallels the taskings of systems engineering; where systems engineering deals with requirements development, allocation to development items and verification, configuration management deals with requirements capture, traceability to the development item, and audit of development item to ensure that it has achieved the desired functionality and outcomes that systems engineering and/or Test and Verification Engineering have obtained and proven through objective testing.
=== Control engineering ===
Control engineering and its design and implementation of control systems, used extensively in nearly every industry, is a large sub-field of systems engineering. The cruise control on an automobile and the guidance system for a ballistic missile are two examples. Control systems theory is an active field of applied mathematics involving the investigation of solution spaces and the development of new methods for the analysis of the control process.
=== Industrial engineering ===
Industrial engineering is a branch of engineering that concerns the development, improvement, implementation, and evaluation of integrated systems of people, money, knowledge, information, equipment, energy, material, and process. Industrial engineering draws upon the principles and methods of engineering analysis and synthesis, as well as mathematical, physical, and social sciences together with the principles and methods of engineering analysis and design to specify, predict, and evaluate results obtained from such systems.
=== Production Systems Engineering ===
Production Systems Engineering (PSE) is an emerging branch of Engineering intended to uncover fundamental principles of production systems and utilize them for analysis, continuous improvement, and design.
=== Interface design ===
Interface design and its specification are concerned with assuring that the pieces of a system connect and inter-operate with other parts of the system and with external systems as necessary. Interface design also includes assuring that system interfaces are able to accept new features, including mechanical, electrical, and logical interfaces, including reserved wires, plug-space, command codes, and bits in communication protocols. This is known as extensibility. Human-Computer Interaction (HCI) or Human-Machine Interface (HMI) is another aspect of interface design and is a critical aspect of modern systems engineering. Systems engineering principles are applied in the design of communication protocols for local area networks and wide area networks.
=== Mechatronic engineering ===
Mechatronic engineering, like systems engineering, is a multidisciplinary field of engineering that uses dynamic systems modeling to express tangible constructs. In that regard, it is almost indistinguishable from Systems Engineering, but what sets it apart is the focus on smaller details rather than larger generalizations and relationships. As such, both fields are distinguished by the scope of their projects rather than the methodology of their practice.
=== Operations research ===
Operations research supports systems engineering. Operations research, briefly, is concerned with the optimization of a process under multiple constraints.
=== Performance engineering ===
Performance engineering is the discipline of ensuring a system meets customer expectations for performance throughout its life. Performance is usually defined as the speed with which a certain operation is executed or the capability of executing a number of such operations in a unit of time. Performance may be degraded when operations queued to execute are throttled by limited system capacity. For example, the performance of a packet-switched network is characterized by the end-to-end packet transit delay or the number of packets switched in an hour. The design of high-performance systems uses analytical or simulation modeling, whereas the delivery of high-performance implementation involves thorough performance testing. Performance engineering relies heavily on statistics, queueing theory, and probability theory for its tools and processes.
=== Program management and project management ===
Program management (or project management) has many similarities with systems engineering, but has broader-based origins than the engineering ones of systems engineering. Project management is also closely related to both program management and systems engineering. Both include scheduling as engineering support tool in assessing interdisciplinary concerns under management process. In particular, the direct relationship of resources, performance features, and risk to the duration of a task or the dependency links among tasks and impacts across the system lifecycle are systems engineering concerns.
=== Proposal engineering ===
Proposal engineering is the application of scientific and mathematical principles to design, construct, and operate a cost-effective proposal development system. Basically, proposal engineering uses the "systems engineering process" to create a cost-effective proposal and increase the odds of a successful proposal.
=== Reliability engineering ===
Reliability engineering is the discipline of ensuring a system meets customer expectations for reliability throughout its life (i.e. it does not fail more frequently than expected). Next to the prediction of failure, it is just as much about the prevention of failure. Reliability engineering applies to all aspects of the system. It is closely associated with maintainability, availability (dependability or RAMS preferred by some), and integrated logistics support. Reliability engineering is always a critical component of safety engineering, as in failure mode and effects analysis (FMEA) and hazard fault tree analysis, and of security engineering.
=== Risk management ===
Risk management, the practice of assessing and dealing with risk is one of the interdisciplinary parts of Systems Engineering. In development, acquisition, or operational activities, the inclusion of risk in tradeoffs with cost, schedule, and performance features, involves the iterative complex configuration management of traceability and evaluation to the scheduling and requirements management across domains and for the system lifecycle that requires the interdisciplinary technical approach of systems engineering. Systems Engineering has Risk Management define, tailor, implement, and monitor a structured process for risk management which is integrated into the overall effort.
=== Safety engineering ===
The techniques of safety engineering may be applied by non-specialist engineers in designing complex systems to minimize the probability of safety-critical failures. The "System Safety Engineering" function helps to identify "safety hazards" in emerging designs and may assist with techniques to "mitigate" the effects of (potentially) hazardous conditions that cannot be designed out of systems.
=== Security engineering ===
Security engineering can be viewed as an interdisciplinary field that integrates the community of practice for control systems design, reliability, safety, and systems engineering. It may involve such sub-specialties as authentication of system users, system targets, and others: people, objects, and processes.
=== Software engineering ===
From its beginnings, software engineering has helped shape modern systems engineering practice. The techniques used in the handling of the complexities of large software-intensive systems have had a major effect on the shaping and reshaping of the tools, methods, and processes of Systems Engineering.
== See also ==
== References ==
== Further reading ==
Madhavan, Guru (2024). Wicked Problems: How to Engineer a Better World. New York: W.W. Norton & Company. ISBN 978-0-393-65146-1
Blockley, D. Godfrey, P. Doing it Differently: Systems for Rethinking Infrastructure, Second Edition, ICE Publications, London, 2017.
Buede, D.M., Miller, W.D. The Engineering Design of Systems: Models and Methods, Third Edition, John Wiley and Sons, 2016.
Chestnut, H., Systems Engineering Methods. Wiley, 1967.
Gianni, D. et al. (eds.), Modeling and Simulation-Based Systems Engineering Handbook, CRC Press, 2014 at CRC
Goode, H.H., Robert E. Machol System Engineering: An Introduction to the Design of Large-scale Systems, McGraw-Hill, 1957.
Hitchins, D. (1997) World Class Systems Engineering at hitchins.net.
Lienig, J., Bruemmer, H., Fundamentals of Electronic Systems Design, Springer, 2017 ISBN 978-3-319-55839-4.
Malakooti, B. (2013). Operations and Production Systems with Multiple Objectives. John Wiley & Sons.ISBN 978-1-118-58537-5
MITRE, The MITRE Systems Engineering Guide(pdf)
NASA (2007) Systems Engineering Handbook, NASA/SP-2007-6105 Rev1, December 2007.
NASA (2013) NASA Systems Engineering Processes and Requirements Archived 27 December 2016 at the Wayback Machine NPR 7123.1B, April 2013 NASA Procedural Requirements
Oliver, D.W., et al. Engineering Complex Systems with Models and Objects. McGraw-Hill, 1997.
Parnell, G.S., Driscoll, P.J., Henderson, D.L. (eds.), Decision Making in Systems Engineering and Management, 2nd. ed., Hoboken, NJ: Wiley, 2011. This is a textbook for undergraduate students of engineering.
Ramo, S., St.Clair, R.K. The Systems Approach: Fresh Solutions to Complex Problems Through Combining Science and Practical Common Sense, Anaheim, CA: KNI, Inc, 1998.
Sage, A.P., Systems Engineering. Wiley IEEE, 1992. ISBN 0-471-53639-3.
Sage, A.P., Olson, S.R., Modeling and Simulation in Systems Engineering, 2001.
SEBOK.org, Systems Engineering Body of Knowledge (SEBoK)
Shermon, D. Systems Cost Engineering, Gower Publishing, 2009
Shishko, R., et al. (2005) NASA Systems Engineering Handbook. NASA Center for AeroSpace Information, 2005.
Stevens, R., et al. Systems Engineering: Coping with Complexity. Prentice Hall, 1998.
US Air Force, SMC Systems Engineering Primer & Handbook, 2004
US DoD Systems Management College (2001) Systems Engineering Fundamentals. Defense Acquisition University Press, 2001
US DoD Guide for Integrating Systems Engineering into DoD Acquisition Contracts Archived 29 August 2017 at the Wayback Machine, 2006
US DoD MIL-STD-499 System Engineering Management
== External links ==
ICSEng homepage
INCOSE homepage
INCOSE UK homepage
PPI SE Goldmine homepage
Systems Engineering Body of Knowledge
Systems Engineering Tools
AcqNotes DoD Systems Engineering Overview
NDIA Systems Engineering Division | Wikipedia/Systems_engineering_process |
The behavioral approach to systems theory and control theory was initiated in the late-1970s by J. C. Willems as a result of resolving inconsistencies present in classical approaches based on state-space, transfer function, and convolution representations. This approach is also motivated by the aim of obtaining a general framework for system analysis and control that respects the underlying physics.
The main object in the behavioral setting is the behavior – the set of all signals compatible with the system. An important feature of the behavioral approach is that it does not distinguish a priority between input and output variables. Apart from putting system theory and control on a rigorous basis, the behavioral approach unified the existing approaches and brought new results on controllability for nD systems, control via interconnection, and system identification.
== Dynamical system as a set of signals ==
In the behavioral setting, a dynamical system is a triple
Σ
=
(
T
,
W
,
B
)
{\displaystyle \Sigma =(\mathbb {T} ,\mathbb {W} ,{\mathcal {B}})}
where
T
⊆
R
{\displaystyle \mathbb {T} \subseteq \mathbb {R} }
is the "time set" – the time instances over which the system evolves,
W
{\displaystyle \mathbb {W} }
is the "signal space" – the set in which the variables whose time evolution is modeled take on their values, and
B
⊆
W
T
{\displaystyle {\mathcal {B}}\subseteq \mathbb {W} ^{\mathbb {T} }}
the "behavior" – the set of signals that are compatible with the laws of the system
(
W
T
{\displaystyle \mathbb {W} ^{\mathbb {T} }}
denotes the set of all signals, i.e., functions from
T
{\displaystyle \mathbb {T} }
into
W
{\displaystyle \mathbb {W} }
).
w
∈
B
{\displaystyle w\in {\mathcal {B}}}
means that
w
{\displaystyle w}
is a trajectory of the system, while
w
∉
B
{\displaystyle w\notin {\mathcal {B}}}
means that the laws of the system forbid the trajectory
w
{\displaystyle w}
to happen. Before the phenomenon is modeled, every signal in
W
T
{\displaystyle \mathbb {W} ^{\mathbb {T} }}
is deemed possible, while after modeling, only the outcomes in
B
{\displaystyle {\mathcal {B}}}
remain as possibilities.
Special cases:
T
=
R
{\displaystyle \mathbb {T} =\mathbb {R} }
– continuous-time systems
T
=
Z
{\displaystyle \mathbb {T} =\mathbb {Z} }
– discrete-time systems
W
=
R
q
{\displaystyle \mathbb {W} =\mathbb {R} ^{q}}
– most physical systems
W
{\displaystyle \mathbb {W} }
a finite set – discrete event systems
== Linear time-invariant differential systems ==
System properties are defined in terms of the behavior. The system
Σ
=
(
T
,
W
,
B
)
{\displaystyle \Sigma =(\mathbb {T} ,\mathbb {W} ,{\mathcal {B}})}
is said to be
"linear" if
W
{\displaystyle \mathbb {W} }
is a vector space and
B
{\displaystyle {\mathcal {B}}}
is a linear subspace of
W
T
{\displaystyle \mathbb {W} ^{\mathbb {T} }}
,
"time-invariant" if the time set consists of the real or natural numbers and
σ
t
B
⊆
B
{\displaystyle \sigma ^{t}{\mathcal {B}}\subseteq {\mathcal {B}}}
for all
t
∈
T
{\displaystyle t\in \mathbb {T} }
,
where
σ
t
{\displaystyle \sigma ^{t}}
denotes the
t
{\displaystyle t}
-shift, defined by
σ
t
(
f
)
(
t
′
)
:=
f
(
t
′
+
t
)
{\displaystyle \sigma ^{t}(f)(t'):=f(t'+t)}
.
In these definitions linearity articulates the superposition law, while time-invariance articulates that the time-shift of a legal trajectory is in its turn a legal trajectory.
A "linear time-invariant differential system" is a dynamical system
Σ
=
(
R
,
R
q
,
B
)
{\displaystyle \Sigma =(\mathbb {R} ,\mathbb {R} ^{q},{\mathcal {B}})}
whose behavior
B
{\displaystyle {\mathcal {B}}}
is the solution set of a system of constant coefficient linear ordinary differential equations
R
(
d
/
d
t
)
w
=
0
{\displaystyle R(d/dt)w=0}
, where
R
{\displaystyle R}
is a matrix of polynomials with real coefficients. The coefficients of
R
{\displaystyle R}
are the parameters of the model. In order to define the corresponding behavior, we need to specify when we consider a signal
w
:
R
→
R
q
{\displaystyle w:\mathbb {R} \rightarrow \mathbb {R} ^{q}}
to be a solution of
R
(
d
/
d
t
)
w
=
0
{\displaystyle R(d/dt)w=0}
. For ease of exposition, often infinite differentiable solutions are considered. There are other possibilities, as taking distributional solutions, or solutions in
L
l
o
c
a
l
(
R
,
R
q
)
{\displaystyle {\mathcal {L}}^{\rm {local}}(\mathbb {R} ,\mathbb {R} ^{q})}
, and with the ordinary differential equations interpreted in the sense of distributions. The behavior defined is
B
=
{
w
∈
C
∞
(
R
,
R
q
)
|
R
(
d
/
d
t
)
w
(
t
)
=
0
for all
t
∈
R
}
.
{\displaystyle {\mathcal {B}}=\{w\in {\mathcal {C}}^{\infty }(\mathbb {R} ,\mathbb {R} ^{q})~|~R(d/dt)w(t)=0{\text{ for all }}t\in \mathbb {R} \}.}
This particular way of representing the system is called "kernel representation" of the corresponding dynamical system. There are many other useful representations of the same behavior, including transfer function, state space, and convolution.
For accessible sources regarding the behavioral approach, see
.
== Observability of latent variables ==
A key question of the behavioral approach is whether a quantity w1 can be deduced given an observed quantity w2 and a model. If w1 can be deduced given w2 and the model, w2 is said to be observable. In terms of mathematical modeling, the to-be-deduced quantity or variable is often referred to as the latent variable and the observed variable is the manifest variable. Such a system is then called an observable (latent variable) system.
== References ==
== Additional sources ==
Paolo Rapisarda and Jan C.Willems, 2006. Recent Developments in Behavioral System Theory, July 24–28, 2006, MTNS 2006, Kyoto, Japan
J.C. Willems. Terminals and ports. IEEE Circuits and Systems Magazine Volume 10, issue 4, pages 8–16, December 2010
J.C. Willems and H.L. Trentelman. On quadratic differential forms. SIAM Journal on Control and Optimization Volume 36, pages 1702-1749, 1998
J.C. Willems. Paradigms and puzzles in the theory of dynamical systems. IEEE Transactions on Automatic Control Volume 36, pages 259-294, 1991
J.C. Willems. Models for dynamics. Dynamics Reported Volume 2, pages 171-269, 1989 | Wikipedia/Behavioral_model |
In software engineering,
a class diagram
in the Unified Modeling Language (UML) is a type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, operations (or methods), and the relationships among objects.
The class diagram is the main building block of object-oriented modeling. It is used for general conceptual modeling of the structure of the application, and for detailed modeling, translating the models into programming code. Class diagrams can also be used for data modeling. The classes in a class diagram represent both the main elements, interactions in the application, and the classes to be programmed.
In the diagram, classes are represented with boxes that contain three compartments:
The top compartment contains the name of the class. It is printed in bold and centered, and the first letter is capitalized.
The middle compartment contains the attributes of the class. They are left-aligned and the first letter is lowercase.
The bottom compartment contains the operations the class can execute. They are also left-aligned and the first letter is lowercase.
In the design of a system, a number of classes are identified and grouped together in a class diagram that helps to determine the static relations between them. In detailed modeling, the classes of the conceptual design are often split into subclasses.
In order to further describe the behavior of systems, these class diagrams can be complemented by a state diagram or UML state machine.
== Members ==
UML provides mechanisms to represent class members, such as attributes and methods, and additional information about them like constructors.
=== Visibility ===
To specify the visibility of a class member (i.e. any attribute or method), these notations must be placed before the members' name:
A derived property is a property whose value (or values) is produced or computed from other information, for example, by using values of other properties.
A derived property is shown with its name preceded by a forward slash '/'.
=== Scope ===
The UML specifies two types of scope for members: instance and class.
The class name appears an underlined concatenation of the instance name (if any), a colon (':'),
and the actual class name.
Instance members are scoped to a specific instance.
Attribute values may vary between instances
Method invocation may affect the instance's state (i.e. change instance's attributes)
Class members are commonly recognized as "static" in many programming languages. The scope end is the class itself.
Attribute values are equal for all instances
Method invocation does not affect the classifier's state
To indicate a classifier scope for a member, its name must be underlined. Otherwise, instance scope is assumed by default.
== Relationships ==
A relationship is a general term covering the specific types of logical connections found on class and object diagrams. UML defines the following relationships:
=== Instance-level relationships ===
==== Dependency ====
A dependency is a type of association where there is a semantic connection between dependent and independent model elements. It exists between two elements if changes to the definition of one element (the server or target) may cause changes to the other (the client or source). This association is uni-directional. A dependency is displayed as a dashed line with an open arrow that points from the client to the supplier.
==== Association ====
An association represents a family of structural links. A binary association is represented as a solid line between two classes. A reflexive association is a binary association between the class and itself. An association between more than two classes is represented as a diamond connected with a solid line to each of the associated classes. An association between three classes is a ternary association. An association between more classes is called an n-ary association.
An association can be named, and the ends of an association can be adorned with role names, aggregation indicators, multiplicity, visibility, navigability and other properties. The dot notation for example allows to represent with a little dot on the side of one class that the association end is owned by the other side.
There are three types of association: simple association, shared aggregation, composite aggregation (composition). An association can be navigable in one or more directions. The navigability does not have to be explicitly specified. An open-headed arrow on the side of a class documents that the class can be reached efficiently at run-time from the opposite side. A unidirectional navigation is shown with a little cross on the association line on the side of the class that cannot be reached. For instance, a flight class is associated with a plane class bi-directionally.
==== Aggregation ====
Aggregation is a variant of the "has a" association relationship; aggregation is more specific than association. It is an association that represents a part-whole or part-of relationship. As shown in the image, a Professor 'has a' class to teach. As a type of association, an aggregation can be named and have the same adornments that an association can. However, an aggregation may not involve more than two classes; it must be a binary association. Furthermore, there is hardly a difference between aggregations and associations during implementation, and the diagram may skip aggregation relations altogether.
Aggregation can occur when a class is a collection or container of other classes, but the contained classes do not have a strong lifecycle dependency on the container. The contents of the container still exist when the container is destroyed.
In UML, it is graphically represented as a hollow diamond shape on the containing class with a single line that connects it to the contained class. The aggregate is semantically an extended object that is treated as a unit in many operations, although physically it is made of several lesser objects.
==== Composition ====
The composite aggregation (colloquially called composition) relationship is a stronger form of aggregation where the aggregate controls the lifecycle of the elements it aggregates. The graphical representation is a filled diamond shape on the containing class end of the line that connect contained class(es) to the containing class.
==== Differences between Composition and Aggregation ====
Composition relationship
1. When attempting to represent real-world whole-part relationships, e.g. an engine is a part of a car.
2. When the container is destroyed, the contents are also destroyed, e.g. a university and its departments.
Aggregation relationship
1. When representing a software or database relationship, e.g. car model engine ENG01 is part of a car model CM01, as the engine, ENG01, maybe also part of a different car model.
2. When the container is destroyed, the contents are usually not destroyed, e.g. a professor has students; when the professor leaves the university the students do not leave along with the professor.
Thus the aggregation relationship is often "catalog" containment to distinguish it from composition's "physical" containment. UML 2 does not specify any semantic for the aggregation compared to the simple association.
=== Class-level relationships ===
==== Generalization/Inheritance ====
The generalization relationship—also known as the inheritance or "is a" relationship—captures the idea of one class, the so-called subclass, being a specialized form of the other (the superclass, super type, or base class). Where this relationship holds, the superclass is considered a generalization of the subclass. In practice, this means that any instance of the subclass is also an instance of the superclass. An exemplary tree of generalizations of this form is found in biological classification, where, for instance, human is a subclass of simian, which is a subclass of mammal, and so on. The relationship is most easily understood by the phrase “an A is a B” (a human is a mammal, a mammal is an animal).
The UML graphical representation of a generalization is a hollow triangle shape on the superclass end of the line (or tree of lines) that connects it to one or more subtypes.
symbolic of realization (subclass) _______▻ (superclass)
Dual to generalization is the specialization relationship. Other terms for a (specialized) subclass of a more general superclass include subtype, derived class, derived type, inheriting class, inheriting type, child, and child class.
Note that this relationship, though similar to the biological parent–child relationship, is distinct from it. The use of the terms parent and child is suggestive, but can be misleading.
A is a type of B
For example, "an oak is a type of tree", "an automobile is a type of vehicle"
Generalization can only be shown on class diagrams and on use case diagrams.
==== Realization/Implementation ====
In UML modelling, a realization relationship is a relationship between two model elements, in which one model element (the client) realizes (implements or executes) the behavior that the other model element (the supplier) specifies.
The UML graphical representation of a Realization is a hollow triangle shape on the interface end of the dashed line (or tree of lines) that connects it to one or more implementers. A plain arrow head is used on the interface end of the dashed line that connects it to its users. In component diagrams, the ball-and-socket graphic convention is used (implementors expose a ball or lollipop, whereas users show a socket).
Realizations can only be shown on class or component diagrams.
A realization is a relationship between classes, interfaces, components and packages that connects a client element with a supplier element. A realization relationship between classes/components and interfaces shows that the class/component realizes the operations offered by the interface.
symbolic of realization (implementer) -------▻ (interface)
=== General relationship ===
==== Dependency ====
Dependency can be a weaker form of bond that indicates that one class depends on another because it uses it at some point in time.
One class depends on another if the independent class is a parameter variable or local variable of a method of the dependent class. Sometimes the relationship between two classes is very weak. They are not implemented with
member variables at all. Rather they might be implemented as member function arguments.
=== Multiplicity ===
This association relationship indicates that (at least) one of the two related classes make reference to the other. This relationship is usually described as "A has a B" (a mother cat has kittens, kittens have a mother cat).
The UML representation of an association is a line connecting the two associated classes. At each end of the line there is optional notation. For example, we can indicate, using an arrowhead that the pointy end is visible from the arrow tail. We can indicate ownership by the placement of a ball, the role the elements of that end play by supplying a name for the role, and the multiplicity of instances of that entity (the range of number of objects that participate in the association from the perspective of the other end).
== Analysis stereotypes ==
=== Entities ===
Entity classes model long-lived information handled by the system, and sometimes the behavior associated with the information. They should not be identified as database tables or other data-stores.
They are drawn as circles with a short line attached to the bottom of the circle. Alternatively, they can be drawn as normal classes with the «entity» stereotype notation above the class name.
== See also ==
Executable UML
List of UML tools
Object-oriented modeling
Dependency (UML)
Related diagrams
Domain model
Entity–relationship model
Object diagram
== References ==
== External links ==
Introduction to UML 2 Class Diagrams
UML 2 Class Diagram Guidelines
IBM Class diagram Introduction
"Classes". Unified Modeling Language 2.5.1. OMG Document Number formal/2017-12-05. Object Management Group Standards Development Organization (OMG SDO). December 2017. p. 194.
UML 2 Class Diagrams | Wikipedia/Structural_model_(software) |
Model-based design (MBD) is a mathematical and visual method of addressing problems associated with designing complex control, signal processing and communication systems. It is used in many motion control, industrial equipment, aerospace, and automotive applications. Model-based design is a methodology applied in designing embedded software.
== Overview ==
Model-based design provides an efficient approach for establishing a common framework for communication throughout the design process while supporting the development cycle (V-model). In model-based design of control systems, development is manifested in these four steps:
modeling a plant,
analyzing and synthesizing a controller for the plant,
simulating the plant and controller,
integrating all these phases by deploying the controller.
The model-based design is significantly different from traditional design methodology. Rather than using complex structures and extensive software code, designers can use Model-based design to define plant models with advanced functional characteristics using continuous-time and discrete-time building blocks. These built models used with simulation tools can lead to rapid prototyping, software testing, and verification. Not only is the testing and verification process enhanced, but also, in some cases, hardware-in-the-loop simulation can be used with the new design paradigm to perform testing of dynamic effects on the system more quickly and much more efficiently than with traditional design methodology.
== History ==
As early as the 1920s two aspects of engineering, control theory and control systems, converged to make large-scale integrated systems possible. In those early days controls systems were commonly used in the industrial environment. Large process facilities started using process controllers for regulating continuous variables such as temperature, pressure, and flow rate. Electrical relays built into ladder-like networks were one of the first discrete control devices to automate an entire manufacturing process.
Control systems gained momentum, primarily in the automotive and aerospace sectors. In the 1950s and 1960s, the push to space generated interest in embedded control systems. Engineers constructed control systems such as engine control units and flight simulators, that could be part of the end product. By the end of the twentieth century, embedded control systems were ubiquitous, as even major household consumer appliances such as washing machines and air conditioners contained complex and advanced control algorithms, making them much more "intelligent".
In 1969, the first computer-based controllers were introduced. These early programmable logic controllers (PLC) mimicked the operations of already available discrete control technologies that used the out-dated relay ladders. The advent of PC technology brought a drastic shift in the process and discrete control market. An off-the-shelf desktop loaded with adequate hardware and software can run an entire process unit, and execute complex and established PID algorithms or work as a Distributed Control System (DCS).
== Steps ==
The main steps in model-based design approach are:
Plant modeling. Plant modeling can be data-driven or based on first principles. Data-driven plant modeling uses techniques such as System identification. With system identification, the plant model is identified by acquiring and processing raw data from a real-world system and choosing a mathematical algorithm with which to identify a mathematical model. Various kinds of analysis and simulations can be performed using the identified model before it is used to design a model-based controller. First-principles based modeling is based on creating a block diagram model that implements known differential-algebraic equations governing plant dynamics. A type of first-principles based modeling is physical modeling, where a model consists in connected blocks that represent the physical elements of the actual plant.
Controller analysis and synthesis. The mathematical model conceived in step 1 is used to identify dynamic characteristics of the plant model. A controller can then be synthesized based on these characteristics.
Offline simulation and real-time simulation. The time response of the dynamic system to complex, time-varying inputs is investigated. This is done by simulating a simple LTI (Linear Time-Invariant) model, or by simulating a non-linear model of the plant with the controller. Simulation allows specification, requirements, and modeling errors to be found immediately, rather than later in the design effort. Real-time simulation can be done by automatically generating code for the controller developed in step 2. This code can be deployed to a special real-time prototyping computer that can run the code and control the operation of the plant. If a plant prototype is not available, or testing on the prototype is dangerous or expensive, code can be automatically generated from the plant model. This code can be deployed to the special real-time computer that can be connected to the target processor with running controller code. Thus a controller can be tested in real-time against a real-time plant model.
Deployment. Ideally this is done via code generation from the controller developed in step 2. It is unlikely that the controller will work on the actual system as well as it did in simulation, so an iterative debugging process is carried out by analyzing results on the actual target and updating the controller model. Model-based design tools allow all these iterative steps to be performed in a unified visual environment.
== Disadvantages ==
The disadvantages of model-based design are fairly well understood this late in development lifecycle of the product and development.
One major disadvantage is that the approach taken is a blanket or coverall approach to standard embedded and systems development. Often the time it takes to port between processors and ecosystems can outweigh the temporal value it offers in the simpler lab based implementations.
Much of the compilation tool chain is closed source, and prone to fence post errors, and other such common compilation errors that are easily corrected in traditional systems engineering.
Design and reuse patterns can lead to implementations of models that are not well suited to that task. Such as implementing a controller for a conveyor belt production facility that uses a thermal sensor, speed sensor, and current sensor. That model is generally not well suited for re-implementation in a motor controller etc. Though its very easy to port such a model over, and introduce all the software faults therein.
Version control issues: Model-based design can encounter significant challenges due to the lack of high-quality tools for managing version control, particularly for handling diff and merge operations. This can lead to difficulties in managing concurrent changes and maintaining robust revision control practices. Although newer tools, such as 3-way merge, have been introduced to address these issues, effectively integrating these solutions into existing workflows remains a complex task.
While Model-based design has the ability to simulate test scenarios and interpret simulations well, in real world production environments, it is often not suitable. Over reliance on a given toolchain can lead to significant rework and possibly compromise entire engineering approaches. While it's suitable for bench work, the choice to use this for a production system should be made very carefully.
== Advantages ==
Some of the advantages model-based design offers in comparison to the traditional approach are:
Model-based design provides a common design environment, which facilitates general communication, data analysis, and system verification between various (development) groups.
Engineers can locate and correct errors early in system design, when the time and financial impact of system modification are minimized.
Design reuse, for upgrades and for derivative systems with expanded capabilities, is facilitated.
Because of the limitations of graphical tools, design engineers previously relied heavily on text-based programming and mathematical models. However, developing these models was time-consuming, and highly prone to error. In addition, debugging text-based programs is a tedious process, requiring much trial and error before a final fault-free model could be created, especially since mathematical models undergo unseen changes during the translation through the various design stages.
Graphical modeling tools aim to improve these aspects of design. These tools provide a very generic and unified graphical modeling environment, and they reduce the complexity of model designs by breaking them into hierarchies of individual design blocks. Designers can thus achieve multiple levels of model fidelity by simply substituting one block element with another. Graphical models also help engineers to conceptualize the entire system and simplify the process of transporting the model from one stage to another in the design process. Boeing's simulator EASY5 was among the first modeling tools to be provided with a graphical user interface, together with AMESim, a multi-domain, multi-level platform based on the Bond Graph theory. This was soon followed by tool like 20-sim and Dymola, which allowed models to be composed of physical components like masses, springs, resistors, etc. These were later followed by many other modern tools such as Simulink and LabVIEW.
== See also ==
Control theory
Functional specification
Model-driven engineering
Scientific modelling
Specification (technical standard)
Systems engineering
== References == | Wikipedia/Model-based_design |
A wide area network (WAN) is a telecommunications network that extends over a large geographic area. Wide area networks are often established with leased telecommunication circuits.
Businesses, as well as schools and government entities, use wide area networks to relay data to staff, students, clients, buyers and suppliers from various locations around the world. In essence, this mode of telecommunication allows a business to effectively carry out its daily function regardless of location. The Internet may be considered a WAN. Many WANs are, however, built for one particular organization and are private. WANs can be separated from local area networks (LANs) in that the latter refers to physically proximal networks.
== Design options ==
The textbook definition of a WAN is a computer network spanning regions, countries, or even the world. However, in terms of the application of communication protocols and concepts, it may be best to view WANs as computer networking technologies used to transmit data over long distances, and between different networks. This distinction stems from the fact that common local area network (LAN) technologies operating at lower layers of the OSI model (such as the forms of Ethernet or Wi-Fi) are often designed for physically proximal networks, and thus cannot transmit data over tens, hundreds, or even thousands of miles or kilometres.
WANs are used to connect LANs and other types of networks together so that users and computers in one location can communicate with users and computers in other locations. Many WANs are built for one particular organization and are private. Others, built by Internet service providers, provide connections from an organization's LAN to the Internet.
WANs are often built using leased lines. At each end of the leased line, a router connects the LAN on one side with a second router within the LAN on the other. Because leased lines can be very expensive, instead of using leased lines, WANs can also be built using less costly circuit switching or packet switching methods. Network protocols including TCP/IP deliver transport and addressing functions. Protocols including Packet over SONET/SDH, Multiprotocol Label Switching (MPLS), Asynchronous Transfer Mode (ATM) and Frame Relay are often used by service providers to deliver the links that are used in WANs. It is also possible to build a WAN with Ethernet.
Academic research into wide area networks can be broken down into three areas: mathematical models, network emulation, and network simulation.
Performance improvements are sometimes delivered via wide area file services or WAN optimization.
== Private networks ==
Of the approximately four billion addresses defined in IPv4, about 18 million addresses in three ranges are reserved for use in private networks. Packets addressed in these ranges are not routable on the public Internet; they are ignored by all public routers. Therefore, private hosts cannot directly communicate with public networks, but require network address translation at a routing gateway for this purpose.
Since two private networks, e.g., two branch offices, cannot directly communicate via the public Internet, the two networks must be bridged across the Internet via a virtual private network (VPN) or other form of IP tunnel that encapsulates packets, including their headers containing the private addresses, for transmission across the public network. Additionally, encapsulated packets may be encrypted to secure their data.
== Connection technology ==
Many technologies are available for wide area network links. Examples include circuit-switched telephone lines, radio wave transmission, and optical fiber. New developments have successively increased transmission rates. In c. 1960, a 110 bit/s line was normal on the edge of the WAN, while core links of 56 or 64 kbit/s were considered fast. Today, households are connected to the Internet with dial-up, asymmetric digital subscriber line (ADSL), cable, WiMAX, cellular network or fiber. The speeds that people can currently use range from 28.8 kbit/s through a 28K modem over a telephone connection to speeds as high as 100 Gbit/s using 100 Gigabit Ethernet.
The following communication and networking technologies have been used to implement WANs.
AT&T conducted trials in 2017 for business use of 400-gigabit Ethernet. Researchers Robert Maher, Alex Alvarado, Domaniç Lavery, and Polina Bayvel of University College London were able to increase networking speeds to 1.125 terabits per second. Christos Santis, graduate student Scott Steger, Amnon Yariv, Martin and Eileen Summerfield developed a new laser that potentially quadruples transfer speeds with fiber optics.
== See also ==
Cell relay
Internet area network (IAN)
Label switching
Low-power wide-area network (LPWAN)
Wide area application services
Wireless WAN
== References ==
== External links ==
Cisco - Introduction to WAN Technologies
"What is WAN (wide area network)? - Definition from WhatIs.com", SearchEnterpriseWAN, archived from the original on 2017-04-29, retrieved 2017-04-21
What is a software-defined wide area network? | Wikipedia/Wide_area_networks |
Sociotechnical systems (STS) in organizational development is an approach to complex organizational work design that recognizes the interaction between people and technology in workplaces. The term also refers to coherent systems of human relations, technical objects, and cybernetic processes that inhere to large, complex infrastructures. Social society, and its constituent substructures, qualify as complex sociotechnical systems.
The term sociotechnical systems was coined by Eric Trist, Ken Bamforth and Fred Emery, in the World War II era, based on their work with workers in English coal mines at the Tavistock Institute in London. Sociotechnical systems pertains to theory regarding the social aspects of people and society and technical aspects of organizational structure and processes. Here, technical does not necessarily imply material technology. The focus is on procedures and related knowledge, i.e. it refers to the ancient Greek term techne. "Technical" is a term used to refer to structure and a broader sense of technicalities. Sociotechnical refers to the interrelatedness of social and technical aspects of an organization or the society as a whole.
Sociotechnical theory is about joint optimization, with a shared emphasis on achievement of both excellence in technical performance and quality in people's work lives. Sociotechnical theory, as distinct from sociotechnical systems, proposes a number of different ways of achieving joint optimization. They are usually based on designing different kinds of organization, according to which the functional output of different sociotechnical elements leads to system efficiency, productive sustainability, user satisfaction, and change management.
== Overview ==
Sociotechnical refers to the interrelatedness of social and technical aspects of an organization. Sociotechnical theory is founded on two main principles:
One is that the interaction of social and technical factors creates the conditions for successful (or unsuccessful) organizational performance. This interaction consists partly of linear "cause and effect" relationships (the relationships that are normally "designed") and partly from "non-linear", complex, even unpredictable relationships (the good or bad relationships that are often unexpected). Whether designed or not, both types of interaction occur when socio and technical elements are put to work.
The corollary of this, and the second of the two main principles, is that optimization of each aspect alone (socio or technical) tends to increase not only the quantity of unpredictable, "un-designed" relationships, but those relationships that are injurious to the system's performance.
Therefore, sociotechnical theory is about joint optimization, that is, designing the social system and technical system in tandem so that they work smoothly together. Sociotechnical theory, as distinct from sociotechnical systems, proposes a number of different ways of achieving joint optimization. They are usually based on designing different kinds of organization, ones in which the relationships between socio and technical elements lead to the emergence of productivity and wellbeing, rather than all too often case of new technology failing to meet the expectations of designers and users alike.
The scientific literature shows terms like sociotechnical all one word, or socio-technical with a hyphen, sociotechnical theory, sociotechnical system and sociotechnical systems theory. All of these terms appear ubiquitously but their actual meanings often remain unclear. The key term "sociotechnical" is something of a buzzword and its varied usage can be unpicked. What can be said about it, though, is that it is most often used to simply, and quite correctly, describe any kind of organization that is composed of people and technology.
The key elements of the STS approach include combining the human elements and the technical systems together to enable new possibilities for work and pave the way for technological change (Trist, 1981). The involvement of human elements in negotiations may cause a larger workload initially, but it is crucial that requirements can be determined and accommodated for prior to implementation as it is central to the systems success. Due to its mutual causality (Davis, 1977), the STS approach has become widely linked with autonomy, completeness and job satisfaction as both systems can work together to achieving a goal.
Enid Mumford (1983) defines the socio-technical approach to recognize technology and people to ensure work systems are highly efficient and contain better characteristics which leads to higher job satisfaction for employees, resulting in a sense of fulfilment to improving quality of work and exceeding expectations. Mumford concludes that the development of information systems is not a technical issue, but a business organization issue which is concerned with the process of change.
== Principles ==
Some of the central principles of sociotechnical theory were elaborated in a seminal paper by Eric Trist and Ken Bamforth in 1951. This is an interesting case study which, like most of the work in sociotechnical theory, is focused on a form of 'production system' expressive of the era and the contemporary technological systems it contained. The study was based on the paradoxical observation that despite improved technology, productivity was falling, and that despite better pay and amenities, absenteeism was increasing. This particular rational organisation had become irrational. The cause of the problem was hypothesized to be the adoption of a new form of production technology which had created the need for a bureaucratic form of organization (rather like classic command-and-control). In this specific example, technology brought with it a retrograde step in organizational design terms. The analysis that followed introduced the terms "socio" and "technical" and elaborated on many of the core principles that sociotechnical theory subsequently became.
“The key elements of the STS approach include combining the human elements and the technical systems together to enable new possibilities for work and pave the way for technological change. Due to its mutual causality, the STS approach has become widely linked with autonomy, completeness and job satisfaction as both systems can work together to achieving a goal.”
=== Responsible autonomy ===
Sociotechnical theory was pioneering for its shift in emphasis, a shift towards considering teams or groups as the primary unit of analysis and not the individual. Sociotechnical theory pays particular attention to internal supervision and leadership at the level of the "group" and refers to it as "responsible autonomy". The overriding point seems to be that having the simple ability of individual team members being able to perform their function is not the only predictor of group effectiveness. There are a range of issues in team cohesion research, for example, that are answered by having the regulation and leadership internal to a group or team.
These, and other factors, play an integral and parallel role in ensuring successful teamwork which sociotechnical theory exploits.
The idea of semi-autonomous groups conveys a number of further advantages. Not least among these, especially in hazardous environments, is the often felt need on the part of people in the organisation for a role in a small primary group. It is argued that such a need arises in cases where the means for effective communication are often somewhat limited. As Carvalho states, this is because "...operators use verbal exchanges to produce continuous, redundant and recursive interactions to successfully construct and maintain individual and mutual awareness...". The immediacy and proximity of trusted team members makes it possible for this to occur. The coevolution of technology and organizations brings with it an expanding array of new possibilities for novel interaction. Responsible autonomy could become more distributed along with the team(s) themselves.
The key to responsible autonomy seems to be to design an organization possessing the characteristics of small groups whilst preventing the "silo-thinking" and "stovepipe" neologisms of contemporary management theory. In order to preserve "...intact the loyalties on which the small group [depend]...the system as a whole [needs to contain] its bad in a way that [does] not destroy its good". In practice, this requires groups to be responsible for their own internal regulation and supervision, with the primary task of relating the group to the wider system falling explicitly to a group leader. This principle, therefore, describes a strategy for removing more traditional command hierarchies.
=== Adaptability ===
Carvajal states that "the rate at which uncertainty overwhelms an organisation is related more to its internal structure than to the amount of environmental uncertainty". Sitter in 1997 offered two solutions for organisations confronted, like the military, with an environment of increased (and increasing) complexity:
"The first option is to restore the fit with the external complexity by an increasing internal complexity. ...This usually means the creation of more staff functions or the enlargement of staff-functions and/or the investment in vertical information systems". Vertical information systems are often confused for "network enabled capability" systems (NEC) but an important distinction needs to be made, which Sitter et al. propose as their second option:
"...the organisation tries to deal with the external complexity by 'reducing' the internal control and coordination needs. ...This option might be called the strategy of 'simple organisations and complex jobs'". This all contributes to a number of unique advantages.
Firstly is the issue of "human redundancy" in which "groups of this kind were free to set their own targets, so that aspiration levels with respect to production could be adjusted to the age and stamina of the individuals concerned". Human redundancy speaks towards the flexibility, ubiquity and pervasiveness of resources within NEC.
The second issue is that of complexity. Complexity lies at the heart of many organisational contexts (there are numerous organizational paradigms that struggle to cope with it). Trist and Bamforth (1951) could have been writing about these with the following passage: "A very large variety of unfavourable and changing environmental conditions is encountered ... many of which are impossible to predict. Others, though predictable, are impossible to alter."
Many type of organisations are clearly motivated by the appealing "industrial age", rational principles of "factory production", a particular approach to dealing with complexity: "In the factory a comparatively high degree of control can be exercised over the complex and moving "figure" of a production sequence, since it is possible to maintain the "ground" in a comparatively passive and constant state". On the other hand, many activities are constantly faced with the possibility of "untoward activity in the 'ground'" of the 'figure-ground' relationship" The central problem, one that appears to be at the nub of many problems that "classic" organisations have with complexity, is that "The instability of the 'ground' limits the applicability ... of methods derived from the factory".
In Classic organisations, problems with the moving "figure" and moving "ground" often become magnified through a much larger social space, one in which there is a far greater extent of hierarchical task interdependence. For this reason, the semi-autonomous group, and its ability to make a much more fine grained response to the "ground" situation, can be regarded as "agile". Added to which, local problems that do arise need not propagate throughout the entire system (to affect the workload and quality of work of many others) because a complex organization doing simple tasks has been replaced by a simpler organization doing more complex tasks. The agility and internal regulation of the group allows problems to be solved locally without propagation through a larger social space, thus increasing tempo.
=== Whole tasks ===
Another concept in sociotechnical theory is the "whole task". A whole task "has the advantage of placing responsibility for the ... task squarely on the shoulders of a single, small, face-to-face group which experiences the entire cycle of operations within the compass of its membership." The Sociotechnical embodiment of this principle is the notion of minimal critical specification. This principle states that, "While it may be necessary to be quite precise about what has to be done, it is rarely necessary to be precise about how it is done". This is no more illustrated by the antithetical example of "working to rule" and the virtual collapse of any system that is subject to the intentional withdrawal of human adaptation to situations and contexts.
The key factor in minimally critically specifying tasks is the responsible autonomy of the group to decide, based on local conditions, how best to undertake the task in a flexible adaptive manner. This principle is isomorphic with ideas like effects-based operations (EBO). EBO asks the question of what goal is it that we want to achieve, what objective is it that we need to reach rather than what tasks have to be undertaken, when and how. The EBO concept enables the managers to "...manipulate and decompose high level effects. They must then assign lesser effects as objectives for subordinates to achieve. The intention is that subordinates' actions will cumulatively achieve the overall effects desired". In other words, the focus shifts from being a scriptwriter for tasks to instead being a designer of behaviours. In some cases, this can make the task of the manager significantly less arduous.
=== Meaningfulness of tasks ===
Effects-based operations and the notion of a "whole task", combined with adaptability and responsible autonomy, have additional advantages for those at work in the organization. This is because "for each participant the task has total significance and dynamic closure" as well as the requirement to deploy a multiplicity of skills and to have the responsible autonomy in order to select when and how to do so. This is clearly hinting at a relaxation of the myriad of control mechanisms found in more classically designed organizations.
Greater interdependence (through diffuse processes such as globalisation) also bring with them an issue of size, in which "the scale of a task transcends the limits of simple spatio-temporal structure. By this is meant conditions under which those concerned can complete a job in one place at one time, i.e., the situation of the face-to-face, or singular group". In other words, in classic organisations the "wholeness" of a task is often diminished by multiple group integration and spatiotemporal disintegration. The group based form of organization design proposed by sociotechnical theory combined with new technological possibilities (such as the internet) provide a response to this often forgotten issue, one that contributes significantly to joint optimisation.
== Topics ==
=== Sociotechnical system ===
A sociotechnical system is the term usually given to any instantiation of socio and technical elements engaged in goal directed behaviour. Sociotechnical systems are a particular expression of sociotechnical theory, although they are not necessarily one and the same thing. Sociotechnical systems theory is a mixture of sociotechnical theory, joint optimisation and so forth and general systems theory. The term sociotechnical system recognises that organizations have boundaries and that transactions occur within the system (and its sub-systems) and between the wider context and dynamics of the environment. It is an extension of Sociotechnical Theory which provides a richer descriptive and conceptual language for describing, analysing and designing organisations. A Sociotechnical System, therefore, often describes a 'thing' (an interlinked, systems based mixture of people, technology and their environment).
Social technical means that technology, which by definition, should not be allowed to be the controlling factor when new work systems are implemented. So in order to be classified as 'Sociotechnical', equal attention must be paid to providing a high quality and satisfying work environment for employees.
The Tavistock researchers, presented that employees who will be using the new and improved system, should be participating in determining the required quality of working life improvements. Participative socio‐technical design can be achieved by in‐depth interviews, questionnaires and collection of data.
Participative socio-technical design can be conducted through in-depth interviews, the collection of statistics and the analysis of relevant documents. These will provide important comparative data that can help approve or disprove the chosen hypotheses. A common approach to participative design is, whenever possible, to use a democratically selected user design group as the key information collectors and decision makers. The design group is backed by a committee of senior staff who can lay the foundations and subsequently oversee the project.
Alter describes sociotechnical analysis and design methods to not be a strong point in the information systems practice. The aim of socio-technical designs is to optimise and join both social and technical systems. However, the problem is that of the technical and social system along with the work system and joint optimisation are not defined as they should be.
=== Sustainability ===
Standalone, incremental improvements are not sufficient to address current, let alone future sustainability challenges. These challenges will require deep changes of sociotechnical systems. Theories on innovation systems; sustainable innovations; system thinking and design; and sustainability transitions, among others, have attempted to describe potential changes capable of shifting development towards more sustainable directions.
=== Autonomous work teams ===
Autonomous work teams also called self-managed teams, are an alternative to traditional assembly line methods. Rather than having a large number of employees each do a small operation to assemble a product, the employees are organized into small teams, each of which is responsible for assembling an entire product. These teams are self-managed, and are independent of one another.
In the mid-1970s, Pehr Gyllenhammar created his new “dock assembly” work system at Volvo’s Kalmar Plant. Instead of the traditional flow line system of car production, self-managed teams would assemble the entire car. The idea of worker directors – a director on the company board who is a representative of the workforce – was established through this project and the Swedish government required them in state enterprises.
=== Job enrichment ===
Job enrichment in organizational development, human resources management, and organizational behavior, is the process of giving the employee a wider and higher level scope of responsibility with increased decision-making authority. This is the opposite of job enlargement, which simply would not involve greater authority. Instead, it will only have an increased number of duties.
The concept of minimal critical specifications. (Mumford, 2006) states workers should be told what to do but not how to do it. Deciding this should be left to their initiative. She says they can be involved in work groups, matrices and networks. The employee should receive correct objectives but they decide how to achieve these objectives.
=== Job enlargement ===
Job enlargement means increasing the scope of a job through extending the range of its job duties and responsibilities. This contradicts the principles of specialisation and the division of labour whereby work is divided into small units, each of which is performed repetitively by an individual worker. Some motivational theories suggest that the boredom and alienation caused by the division of labour can actually cause efficiency to fall.
=== Job rotation ===
Job rotation is an approach to management development, where an individual is moved through a schedule of assignments designed to give him or her a breadth of exposure to the entire operation. Job rotation is also practiced to allow qualified employees to gain more insights into the processes of a company and to increase job satisfaction through job variation. The term job rotation can also mean the scheduled exchange of persons in offices, especially in public offices, prior to the end of incumbency or the legislative period. This has been practiced by the German green party for some time but has been discontinued.
=== Motivation ===
Motivation in psychology refers to the initiation, direction, intensity and persistence of behavior. Motivation is a temporal and dynamic state that should not be confused with personality or emotion. Motivation is having the desire and willingness to do something. A motivated person can be reaching for a long-term goal such as becoming a professional writer or a more short-term goal like learning how to spell a particular word. Personality invariably refers to more or less permanent characteristics of an individual's state of being (e.g., shy, extrovert, conscientious). As opposed to motivation, emotion refers to temporal states that do not immediately link to behavior (e.g., anger, grief, happiness).
With the view that socio-technical design is by which intelligence and skill combined with emerging technologies could improve the work-life balance of employees, it is also believed that the aim is to achieve both a safer and more pleasurable workplace as well as to see greater democracy in society. The achievement of these aims would therefore lead to increased motivation of employees and would directly and positively influence their ability to express ideas. Enid Mumford's work on redesigning designing human systems also expressed that it is the role of the facilitator to “keep the members interested and motivated toward the design task, to help them resolve any conflicts”.
Mumford states that although technology and organizational structures may change in industry, the employee rights and needs must be given a high priority. Future commercial success requires motivated work forces who are committed to their employers’ interests. This requires companies; managers who are dedicated to creating this motivation and recognize what is required for it to be achieved. Returning to socio-technical values, objectives; principals may provide an answer.
Mumford reflects on leadership within organisations, because lack of leadership has proven to be the downfall of most companies. As competition increases employers have lost their valued and qualified employees to their competitors. Opportunities such as better job roles and an opportunity to work your way up has motivated these employees to join their rivals. Mumford suggests that a delegation of responsibility could help employees stay motivated as they would feel appreciated and belonging thus keeping them in their current organization. Leadership is key as employees would prefer following a structure and knowing that there is opportunity to improve.
When Mumford analysed the role of user participation during two ES projects A drawback that was found was that users found it difficult to see beyond their current practices and found it difficult to anticipate how things can be done differently. Motivation was found to be another challenge during this process as users were not interested in participating (Wagner, 2007).
=== Process improvement ===
Process improvement in organizational development is a series of actions taken to identify, analyze and improve existing processes within an organization to meet new goals and objectives. These actions often follow a specific methodology or strategy to create successful results.
=== Task analysis ===
Task analysis is the analysis of how a task is accomplished, including a detailed description of both manual and mental activities, task and element durations, task frequency, task allocation, task complexity, environmental conditions, necessary clothing and equipment, and any other unique factors involved in or required for one or more people to perform a given task. This information can then be used for many purposes, such as personnel selection and training, tool or equipment design, procedure design (e.g., design of checklists or decision support systems) and automation.
=== Job design ===
Job design or work design in organizational development is the application of sociotechnical systems principles and techniques to the humanization of work, for example, through job enrichment. The aims of work design to improved job satisfaction, to improved through-put, to improved quality and to reduced employee problems, e.g., grievances, absenteeism.
=== Deliberations ===
Deliberations are key units of analysis in non-linear, knowledge work. They are 'choice points' that move knowledge work forward. As originated and defined by Cal Pava (1983) in a second-generation development of STS theory, deliberations are patterns of exchange and communication to reduce the equivocality of a problematic issue; for example, for systems engineering work, what features to develop in new software. Deliberations are not discrete decisions—they are a more continuous context for decisions. They have 3 aspects: topics, forums, and participants.
=== Work System Theory (WST) and Work System Method (WSM) ===
The WST and WSM simplifies the conceptualization of traditional complicated socio-technical system (STS) approach (Alter, 2015). Extending the prior research on STS which divides social and technical aspects; WST combines the two perspectives in a work system and outlines the framework for WSM which considers work system as the system of interest and proposes solutions accordingly (Alter, 2015).
The Work System Theory (WST) and Work System Method (WSM) are both forms of socio-technical systems but in the form of work systems. Also, the Work System Method encourages the use of both socio-technical ideas and values when it comes to IS development, use and implementation.
=== Evolution of socio-technical systems ===
The evolution of socio-technical design has seen its development from being approached as a social system exclusively. The realisation of the joint optimisation of social and technical systems was later realised. It was divided into sections where primary work which looks into principles and description, and how to incorporate technical designs on a macrosocial level.
=== Benefits of seeing sociotechnical systems through a work system lens ===
Analysing and designing sociotechnical systems from a work system perspective and eliminates the artificial distinction of the social system from the technical system. This also eliminates the idea of joint optimization. By using a work system lens in can bring many benefits, such as:
Viewing the work system as a whole, making it easier to discuss and analyse
More organised approach by even outlining basic understanding of a work system
A readily usable analysis method making it more adaptable for performing analysis of a work system
Does not require guidance by experts and researchers
Reinforces the idea that a work system exists to produce a product(s)/service(s)
Easier to theorize potential staff reductions, job roles changing and reorganizations
Encourages motivation and good will while reducing the stress from monitoring
Conscientious that documentation and practice may differ
=== Problems to overcome ===
Difference in cultures across the world
Data theft of company information and networked systems
"Big Brother" effect on employees
Hierarchical imbalance between managers and lower staff
Persuading peoples old attitude of 'instant fixes' without any real thought of structure
=== Social network / structure ===
The social network perspective first started in 1920 at Harvard University within the Sociology Department. Within information systems social networks have been used to study behaviour of teams, organisations and Industries. Social network perspective is useful for studying some of the emerging forms of social or organisational arrangements and the roles of ICT.
=== Social media and Artificial Intelligence ===
Recent work on Artificial Intelligence considers large Sociotechnical Systems,
such as social networks and online marketplaces,
as agents whose behaviour can be purposeful and adaptive. The behaviour of recommender
systems can therefore be analysed in the language and framework of sociotechnical systems,
leading also to a new perspective for their legal regulation.
=== Multi-directional inheritance ===
Multi-directional inheritance is the premise that work systems inherit their purpose, meaning and structure from the organisation and reflect the priorities and purposes of the organisation that encompasses them. Fundamentally, this premise includes crucial assumptions about sequencing, timescales, and precedence. The purpose, meaning and structure can derive from multiple contexts and once obtained it can be passed on to the sociotechnical systems that emerge throughout the organisation.
=== Sociological perspective on sociotechnical systems ===
A 1990s research interest in social dimensions of IS directed to relationship among IS development, uses, and resultant social and organizational changes offered fresh insight into the emerging role of ICT within differing organizational context; drawing directly on sociological theories of institution. This sociotechnical research has informed if not shaped IS scholarship. Sociological theories have offered a solid basis upon which emerging sociotechnical research built.
=== ETHICS history ===
The ETHICS (Effective Technical and Human Implementation of Computer Systems) process has been used successfully by Mumford in a variety of projects since its idea conception from the Turners Asbestos Cement project. After forgetting a vital request from the customer to discuss and potentially fix the issues found with the current organisation, she gave her advice on making a system. The system was not received well and Mumford was told they already had been using a similar system. This is when she realised a participative based approach would benefit many future projects.
Enid Mumfords ETHICS development was a push from her to remind those in the field that research doesn't always need to be done on things of current interest and following the immediate trends over your current research is not always the way forward. A reminder that work should always be finished and we should never “write them off with no outcome.” as she said.
== See also ==
Complex systems – System composed of many interacting componentsPages displaying short descriptions of redirect targets
Cybernetics – Transdisciplinary field concerned with regulatory and purposive systems
Feedback – Process where information about current status is used to influence future status
Human factors – Designing systems to suit their usersPages displaying short descriptions of redirect targets
Remote work – Employees working from any location
Social machine – social systemPages displaying wikidata descriptions as a fallback
Social network – Social structure made up of a set of social actors
Sociology – Social science that studies human society and its development
Sociotechnology – Study of processes on the intersection of society and technology
Systems theory – Interdisciplinary study of systems
Systems science – Study of the nature of systems
== References ==
== Further reading ==
Kenyon B. De Greene (1973). Sociotechnical systems: factors in analysis, design, and management.
Jose Luis Mate and Andres Silva (2005). Requirements Engineering for Sociotechnical Systems.
Enid Mumford (1985). Sociotechnical Systems Design: Evolving Theory and Practice.
William A. Pasmore and John J. Sherwood (1978). Sociotechnical Systems: A Sourcebook.
William A. Pasmore (1988). Designing Effective Organizations: The Sociotechnical Systems Perspective.
Pascal Salembier, Tahar Hakim Benchekroun (2002). Cooperation and Complexity in Sociotechnical Systems.
Sawyer, S. and Jarrahi, M.H. (2014) The Sociotechnical Perspective: Information Systems and Information Technology, Volume 2 (Computing Handbook Set, Third Edition,) edited by Heikki Topi and Allen Tucker. Chapman and Hall/CRC. | http://sawyer.syr.edu/publications/2013/sociotechnical%20chapter.pdf
James C. Taylor and David F. Felten (1993). Performance by Design: Sociotechnical Systems in North America.
Eric Trist and H. Murray ed. (1993).The Social Engagement of Social Science, Volume II: The Socio-Technical Perspective. Philadelphia: University of Pennsylvania Press.http://www.moderntimesworkplace.com/archives/archives.html
James T. Ziegenfuss (1983). Patients' Rights and Organizational Models: Sociotechnical Systems Research on mental health programs.
Hongbin Zha (2006). Interactive Technologies and Sociotechnical Systems: 12th International Conference, VSMM 2006, Xi'an, China, October 18–20, 2006, Proceedings.
Trist, E., & Labour, O. M. o. (1981). The evolution of socio-technical systems: A conceptual framework and an action research program: Ontario Ministry of Labour, Ontario Quality of Working Life Centre.
Amelsvoort, P., & Mohr, B. (Co-Eds.) (2016). "Co-Creating Humane and Innovative Organizations: Evolutions in the Practice of Socio-Technical System Design": Global STS-D Network Press
Pava, C., 1983. Managing New Office Technology. Free Press, New York, NY.
== External links ==
Ropohl, Günter (1999). "Philosophy of Socio-Technical Systems". Society for Philosophy and Technology Quarterly Electronic Journal. 4 (3): 186–194. doi:10.5840/techne19994311. S2CID 18537088.
JP Vos, The making of strategic realities : an application of the social systems theory of Niklas Luhmann, Technical University of Eindhoven, Department of Technology Management, 2002.
STS Roundtable, an international not-for-profit association of professional and scholarly practitioners of Sociotechnical Systems Theory
IEEE 1st Workshop on Socio-Technical Aspects of Mashups
http://istheory.byu.edu/wiki/Socio-technical_theory
Cartelli, Antonio (2007). "Socio-Technical Theory and Knowledge Construction: Towards New Pedagogical Paradigms?". Proceedings of the 2007 InSITE Conference. Vol. 7. CiteSeerX 10.1.1.381.9353. doi:10.28945/3051.
http://www.moderntimesworkplace.com/archives/archives.html, Archived Vol I, II, & III of The Tavistock Anthology | Wikipedia/Sociotechnical_systems |
In the United States military integrated acquisition lifecycle the technical section has multiple acquisition technical reviews. Technical reviews and audits assist the acquisition and the number and types are tailored to the acquisition. Overall guidance flows from the Defense Acquisition Guidebook chapter 4, with local details further defined by the review organizations. Typical topics examined include adequacy of program/contract metrics, proper staffing, risks, budget, and schedule.
In NASA's engineering design life cycle, design reviews are held for technical and programmatic accountability and to authorize the release of funding to a project. A design review provides an in-depth assessment by an independent team of discipline experts and managers that the design (or concept) is realistic and attainable from a programmatic and technical sense.
Design review is also required of medical device developers as part of a system of design controls described in the US Food and Drug Administration's governing regulations in 21CFR820. In 21CFR820.3(h), design review is described as "documented, comprehensive, systematic examination of the design to evaluate the adequacy of the design requirements, to evaluate the capability of the design to meet these requirements, and to identify problems". The FDA also specifies that a design review should include an independent reviewer.
== Review process ==
The list of reviews done by an effort and the content, nature, process, and objectives any review uses vary enormously by the organization involved and the particular situation of the effort. For example, even within the U.S. Department of Defense, system requirements review cases include, for example, (1) a 5-day perusal of each individual requirement, or (2) a 2-day discussion of development plan documents allowed only after the system requirements have been approved and the development documents reviewed with formal action items required, or (3) a half-day PowerPoint with content determined by the project manager with attendance limited to high-level (non-technical) stakeholders with no output other than the PM being able to claim "SRR done".
Some of the reviews that may be done on an effort include:
=== Mission concept review (MCR) ===
The MCR affirms the mission need and examines the proposed mission's objectives and the concept for meeting those objectives.
=== System requirements review (SRR) ===
The SRR examines the functional requirements and performance requirements defined for the system and the preliminary program or project plan and ensures that the requirements and the selected concept will satisfy the mission.
=== Mission definition review (MDR) ===
The MDR examines the proposed requirements, the mission architecture, and the flow down to all functional elements of the mission to ensure that the overall concept is complete, feasible, and consistent with available resources.
=== System design review (SDR) ===
The SDR examines the proposed system architecture and design and the flow down to all functional elements of the system.
=== Preliminary design review (PDR) ===
The PDR demonstrates that the preliminary design meets all system requirements with acceptable risk and within the cost and schedule constraints and establishes the basis for proceeding with detailed design. It will show that the correct design options have been selected, interfaces have been identified, and verification methods have been described.
The following are typical objectives of a PDR:
Ensure that all system requirements have been validated, allocated, the requirements are complete, and the flowdown is adequate to verify system performance
Show that the proposed design is expected to meet the functional and performance requirements
Show sufficient maturity in the proposed design approach to proceed to final design
Show that the design is verifiable and that the risks have been identified, characterized, and mitigated where appropriate.
=== Critical design review (CDR) ===
The CDR demonstrates that the maturity of the design is appropriate to support proceeding with full-scale fabrication, assembly, integration, and test. CDR determines that the technical effort is on track to complete the flight and ground system development and mission operations, meeting mission performance requirements within the identified cost and schedule constraints.
The following are typical objectives of a CDR:
Ensure that the "build-to" baseline contains detailed hardware and software specifications that can meet functional and performance requirements
Ensure that the design has been satisfactorily audited by production, verification, operations, and other specialty engineering organizations
Ensure that the production processes and controls are sufficient to proceed to the fabrication stage
Establish that planned quality assurance (QA) activities will establish perceptive verification and screening processes for producing a quality product
Verify that the final design fulfills the specifications established at PDR.
=== Production readiness review (PRR) ===
A PRR is held for flight system and ground support projects developing or acquiring multiple or similar systems greater than three or as determined by the project. The PRR determines the readiness of the system developers to efficiently produce the required number of systems. It ensures that the production plans; fabrication, assembly, and integration enabling products; and personnel are in place and ready to begin production.
=== Test readiness review (TRR) ===
A TRR ensures that the test article (hardware/software), test facility, support personnel, and test procedures are ready for testing and data acquisition, reduction, and control. This is not a prerequisite for key decision point entry.
=== System acceptance review (SAR) ===
The SAR verifies the completeness of the specific end products in relation to their expected maturity level and assesses compliance to stakeholder expectations. The SAR examines the system, its end products and documentation, and test data and analyses that support verification. It also ensures that the system has sufficient technical maturity to authorize its shipment to the designated operational facility or launch site.
=== Operational readiness review (ORR) ===
The ORR examines the actual system characteristics and the procedures used in the system or end product's operation and ensures that all system and support (flight and ground) hardware, software, personnel, procedures, and user documentation accurately reflect the deployed state of the system.
The following are typical objectives of an ORR:
Establish that the system is ready to transition into an operational mode through examination of available ground and flight test results, analyses, and operational demonstrations
Confirm that the system is operationally and logistically supported in a satisfactory manner considering all modes of operation and support (normal, contingency, and unplanned)
Establish that operational documentation is complete and represents the system configuration and its planned modes of operation
Establish that the training function is in place and has demonstrated capability to support all aspects of system maintenance, preparation, operation, and recovery.
=== Flight readiness review (FRR) ===
The FRR examines tests, demonstrations, analyses, and audits that determine the system's readiness for a safe and successful flight or launch and for subsequent flight operations. It also ensures that all flight and ground hardware, software, personnel, and procedures are operationally ready.
The following are typical objectives of a FRR:
Receive certification that flight operations can safely proceed with acceptable risk.
Confirm that the system and support elements are properly configured and ready for launch.
Establish that all interfaces are compatible and function as expected.
Establish that the system state supports a launch "go" decision based on go/no-go criteria.
== See also ==
Critical path method
Engineering design process
Systems Development Life Cycle
Technical peer review
== References == | Wikipedia/Design_review_(U.S._government) |
In software engineering and systems engineering, a functional requirement defines a function of a system or its component, where a function is described as a summary (or specification or statement) of behavior between inputs and outputs.
Functional requirements may involve calculations, technical details, data manipulation and processing, and other specific functionality that define what a system is supposed to accomplish. Behavioral requirements describe all the cases where the system uses the functional requirements, these are captured in use cases. Functional requirements are supported by non-functional requirements (also known as "quality requirements"), which impose constraints on the design or implementation (such as performance requirements, security, or reliability). Generally, functional requirements are expressed in the form "system must do <requirement>," while non-functional requirements take the form "system shall be <requirement>." The plan for implementing functional requirements is detailed in the system design, whereas non-functional requirements are detailed in the system architecture.
As defined in requirements engineering, functional requirements specify particular results of a system. This should be contrasted with non-functional requirements, which specify overall characteristics such as cost and reliability. Functional requirements drive the application architecture of a system, while non-functional requirements drive the technical architecture of a system.
In some cases, a requirements analyst generates use cases after gathering and validating a set of functional requirements. The hierarchy of functional requirements collection and change, broadly speaking, is: user/stakeholder request → analyze → use case → incorporate. Stakeholders make a request; systems engineers attempt to discuss, observe, and understand the aspects of the requirement; use cases, entity relationship diagrams, and other models are built to validate the requirement; and, if documented and approved, the requirement is implemented/incorporated. Each use case illustrates behavioral scenarios through one or more functional requirements. Often, though, an analyst will begin by eliciting a set of use cases, from which the analyst can derive the functional requirements that must be implemented to allow a user to perform each use case.
== Process ==
A typical functional requirement will contain a unique name and number, a brief summary, and a rationale. This information is used to help the reader understand why the requirement is needed, and to track the requirement through the development of the system. The crux of the requirement is the description of the required behavior, which must be clear and readable. The described behavior may come from organizational or business rules, or it may be discovered through elicitation sessions with users, stakeholders, and other experts within the organization. Many requirements may be uncovered during the use case development. When this happens, the requirements analyst may create a placeholder requirement with a name and summary, and research the details later, to be filled in when they are better known.
== See also ==
Function (computer science)
Function (engineering)
Function (mathematics)
Function point
Functional decomposition
Functional design
Functional model
Separation of concerns
Software sizing
== References == | Wikipedia/Functional_requirement |
Environmental systems analysis (ESA) is a systematic and systems based approach for describing human actions impacting on the natural environment to support decisions and actions aimed at perceived current or future environmental problems. Impacts of different types of objects are studied that ranges from projects, programs and policies, to organizations, and products. Environmental systems analysis encompasses a family of environmental assessment tools and methods, including life cycle assessment (LCA), material flow analysis (MFA) and substance flow analysis (SFA), and environmental impact assessment (EIA), among others.
== Overview ==
ESA studies aims at describing the environmental repercussions of defined human activities. These activities are mostly effective through use of different technologies altering material and energy flows, or (in)directly changing ecosystems (e.g. through changed land-use, agricultural practices, logging etc.), leading to undesired environmental impacts in a, more or less, specifically defined geographical area, and time, ranging from local to global.
The basis for the analytical procedures used in ESA studies is the perception of flows of matter and energy associated to causal chains linking human activities to the environmental changes of concern. Some methods are focusing different parts or aspects of the energy/matter flows or the causal chains, where flow models like MFA or LCA deals with the more or less human controlled societal flows while, e.g. ecological risk assessment (ERA) is related to disentangling environmental causal chains.
Environmental systems analysis studies has been suggested to be divided between "full" and "attributional" approaches. The full mode covers identified material and energy flows and associated processes leading to environmental impacts. The attributional approach, on the other hand, is based on an analysis of the processes needed to fulfil a certain purpose such as the function that a product delivers.
The combination of methods (e.g. LCA and environmental risk assessment) has also been of interest
Methods can be grouped into procedural and analytical approaches. The procedural ones (e.g. EIA or strategic environmental assessment, SEA) focus on the procedure around the analysis, while the analytical ones (e.g. LCA, MFA) put the main focus on technical aspects of the analysis, and can be used as parts of the procedural approaches. Regarding the impacts studied, the environmental issues cover both effects of natural resource use and other environmental impacts, e.g. due to emissions of chemicals, or other agents. In addition, environmental systems analysis studies can cover or be based on economic accounts (life cycle costing, cost-benefit analysis, input-output analysis, systems for economic and environmental accounts), or consider social aspects. The objects of study are distinguished into five categories. These are projects, policies and plans, regions or nations, firms and other organizations, products and functions, and substances.
Further, environmental systems analysis studies are often used to support decision making and it is acknowledged that the decision context varies and is of importance. This regards, for example, that business activities can be related in different ways to the products and other objects studied in environmental systems analysis.
== History ==
A perception of a coherent family of tools and methods for ESA started to become established by findings published in the year 2000. Common characteristics were found to recently have appeared across tools and methods that had previously been seen as distinct from each other. The characteristics were full and attribution approaches, respectively, and the tools and methods were each earlier determined by one unique combination of flow object, spatial boundary and relation to time.
An overview of tools and methods for ESA was published five years later. It was to a large extent based on a series of reports and also drew on the life cycle management project CHAINET. The series of reports covered for example an introduction to tools for Esa that also related them to decision situations, and a study on differences and similarities between tools for esa where a short case study on heat production was included. In the CHAINET project, commissioned by the EU Environment and Climate programme, analytical tools for decision making were studied regarding demand and supply of environmental information, while procedural ESA approaches were not covered.
An expansion of the field has occurred and a number of scientific journals publish extensively on the application of ESA methods e.g. Energy and Environmental Science, Environmental Science and Technology, Journal of Cleaner Production, International Journal of Life-cycle Assessment, and Journal of Industrial Ecology
== Tools and methods ==
The environmental systems analysis tools and methods include:
Cost-benefit analysis (CBA)
Ecological footprint (EF)
Energy analysis (En)
Environmental impact assessment (EIA)
Environmental management system (EMS)
Input-output analysis (IOA)
Life-cycle assessment (LCA)
Life-cycle cost analysis (LCCA)
Material flow accounting (MFA)
Risk assessment
Strategic environmental assessment (SEA)
Systems for economic and environmental accounts (SEEA)
== See also ==
Carbon footprint
Cleaner production
Ecological economics
Environmental management
Industrial ecology
Sustainability
Sustainable development
Sustainability measurement
Technology assessment
== External links ==
Environmental Systems Analysis at Chalmers University of Technology, Sweden
Environmental Systems Analysis Group at Wageningen UR (University & Research centre), Netherlands
Agricultural and Environmental Systems Analysis at the University of Nottingham, Great Britain
== References == | Wikipedia/Environmental_systems_analysis |
The term conceptual model refers to any model that is formed after a conceptualization or generalization process. Conceptual models are often abstractions of things in the real world, whether physical or social. Semantic studies are relevant to various stages of concept formation. Semantics is fundamentally a study of concepts, the meaning that thinking beings give to various elements of their experience.
== Overview ==
=== Concept models and conceptual models ===
The value of a conceptual model is usually directly proportional to how well it corresponds to a past, present, future, actual or potential state of affairs. A concept model (a model of a concept) is quite different because in order to be a good model it need not have this real world correspondence. In artificial intelligence, conceptual models and conceptual graphs are used for building expert systems and knowledge-based systems; here the analysts are concerned to represent expert opinion on what is true not their own ideas on what is true.
=== Type and scope of conceptual models ===
Conceptual models range in type from the more concrete, such as the mental image of a familiar physical object, to the formal generality and abstractness of mathematical models which do not appear to the mind as an image. Conceptual models also range in terms of the scope of the subject matter that they are taken to represent. A model may, for instance, represent a single thing (e.g. the Statue of Liberty), whole classes of things (e.g. the electron), and even very vast domains of subject matter such as the physical universe. The variety and scope of conceptual models is due to the variety of purposes for using them.
Conceptual modeling is the activity of formally describing some aspects of the physical and social world around us for the purposes of understanding and communication.
=== Fundamental objectives ===
A conceptual model's primary objective is to convey the fundamental principles and basic functionality of the system which it represents. Also, a conceptual model must be developed in such a way as to provide an easily understood system interpretation for the model's users. A conceptual model, when implemented properly, should satisfy four fundamental objectives.
Enhance an individual's understanding of the representative system
Facilitate efficient conveyance of system details between stakeholders
Provide a point of reference for system designers to extract system specifications
Document the system for future reference and provide a means for collaboration
The conceptual model plays an important role in the overall system development life cycle. Figure 1 below, depicts the role of the conceptual model in a typical system development scheme. It is clear that if the conceptual model is not fully developed, the execution of fundamental system properties may not be implemented properly, giving way to future problems or system shortfalls. These failures do occur in the industry and have been linked to; lack of user input, incomplete or unclear requirements, and changing requirements. Those weak links in the system design and development process can be traced to improper execution of the fundamental objectives of conceptual modeling. The importance of conceptual modeling is evident when such systemic failures are mitigated by thorough system development and adherence to proven development objectives/techniques.
== Modelling techniques ==
Numerous techniques can be applied across multiple disciplines to increase the user's understanding of the system to be modeled. A few techniques are briefly described in the following text, however, many more exist or are being developed. Some commonly used conceptual modeling techniques and methods include: workflow modeling, workforce modeling, rapid application development, object-role modeling, and the Unified Modeling Language (UML).
=== Data flow modeling ===
Data flow modeling (DFM) is a basic conceptual modeling technique that graphically represents elements of a system. DFM is a fairly simple technique; however, like many conceptual modeling techniques, it is possible to construct higher and lower level representative diagrams. The data flow diagram usually does not convey complex system details such as parallel development considerations or timing information, but rather works to bring the major system functions into context. Data flow modeling is a central technique used in systems development that utilizes the structured systems analysis and design method (SSADM).
=== Entity relationship modeling ===
Entity–relationship modeling (ERM) is a conceptual modeling technique used primarily for software system representation. Entity-relationship diagrams, which are a product of executing the ERM technique, are normally used to represent database models and information systems. The main components of the diagram are the entities and relationships. The entities can represent independent functions, objects, or events. The relationships are responsible for relating the entities to one another. To form a system process, the relationships are combined with the entities and any attributes needed to further describe the process. Multiple diagramming conventions exist for this technique; IDEF1X, Bachman, and EXPRESS, to name a few. These conventions are just different ways of viewing and organizing the data to represent different system aspects.
=== Event-driven process chain ===
The event-driven process chain (EPC) is a conceptual modeling technique which is mainly used to systematically improve business process flows. Like most conceptual modeling techniques, the event driven process chain consists of entities/elements and functions that allow relationships to be developed and processed. More specifically, the EPC is made up of events which define what state a process is in or the rules by which it operates. In order to progress through events, a function/ active event must be executed. Depending on the process flow, the function has the ability to transform event states or link to other event driven process chains. Other elements exist within an EPC, all of which work together to define how and by what rules the system operates. The EPC technique can be applied to business practices such as resource planning, process improvement, and logistics.
=== Joint application development ===
The dynamic systems development method uses a specific process called JEFFF to conceptually model a systems life cycle. JEFFF is intended to focus more on the higher level development planning that precedes a project's initialization. The JAD process calls for a series of workshops in which the participants work to identify, define, and generally map a successful project from conception to completion. This method has been found to not work well for large scale applications, however smaller applications usually report some net gain in efficiency.
=== Place/transition net ===
Also known as Petri nets, this conceptual modeling technique allows a system to be constructed with elements that can be described by direct mathematical means. The petri net, because of its nondeterministic execution properties and well defined mathematical theory, is a useful technique for modeling concurrent system behavior, i.e. simultaneous process executions.
=== State transition modeling ===
State transition modeling makes use of state transition diagrams to describe system behavior. These state transition diagrams use distinct states to define system behavior and changes. Most current modeling tools contain some kind of ability to represent state transition modeling. The use of state transition models can be most easily recognized as logic state diagrams and directed graphs for finite-state machines.
=== Technique evaluation and selection ===
Because the conceptual modeling method can sometimes be purposefully vague to account for a broad area of use, the actual application of concept modeling can become difficult. To alleviate this issue, and shed some light on what to consider when selecting an appropriate conceptual modeling technique, the framework proposed by Gemino and Wand will be discussed in the following text. However, before evaluating the effectiveness of a conceptual modeling technique for a particular application, an important concept must be understood; Comparing conceptual models by way of specifically focusing on their graphical or top level representations is shortsighted. Gemino and Wand make a good point when arguing that the emphasis should be placed on a conceptual modeling language when choosing an appropriate technique. In general, a conceptual model is developed using some form of conceptual modeling technique. That technique will utilize a conceptual modeling language that determines the rules for how the model is arrived at. Understanding the capabilities of the specific language used is inherent to properly evaluating a conceptual modeling technique, as the language reflects the techniques descriptive ability. Also, the conceptual modeling language will directly influence the depth at which the system is capable of being represented, whether it be complex or simple.
==== Considering affecting factors ====
Building on some of their earlier work, Gemino and Wand acknowledge some main points to consider when studying the affecting factors: the content that the conceptual model must represent, the method in which the model will be presented, the characteristics of the model's users, and the conceptual model languages specific task. The conceptual model's content should be considered in order to select a technique that would allow relevant information to be presented. The presentation method for selection purposes would focus on the technique's ability to represent the model at the intended level of depth and detail. The characteristics of the model's users or participants is an important aspect to consider. A participant's background and experience should coincide with the conceptual model's complexity, else misrepresentation of the system or misunderstanding of key system concepts could lead to problems in that system's realization. The conceptual model language task will further allow an appropriate technique to be chosen. The difference between creating a system conceptual model to convey system functionality and creating a system conceptual model to interpret that functionality could involve two completely different types of conceptual modeling languages.
==== Considering affected variables ====
Gemino and Wand go on to expand the affected variable content of their proposed framework by considering the focus of observation and the criterion for comparison. The focus of observation considers whether the conceptual modeling technique will create a "new product", or whether the technique will only bring about a more intimate understanding of the system being modeled. The criterion for comparison would weigh the ability of the conceptual modeling technique to be efficient or effective. A conceptual modeling technique that allows for development of a system model which takes all system variables into account at a high level may make the process of understanding the system functionality more efficient, but the technique lacks the necessary information to explain the internal processes, rendering the model less effective.
When deciding which conceptual technique to use, the recommendations of Gemino and Wand can be applied in order to properly evaluate the scope of the conceptual model in question. Understanding the conceptual models scope will lead to a more informed selection of a technique that properly addresses that particular model. In summary, when deciding between modeling techniques, answering the following questions would allow one to address some important conceptual modeling considerations.
What content will the conceptual model represent?
How will the conceptual model be presented?
Who will be using or participating in the conceptual model?
How will the conceptual model describe the system?
What is the conceptual models focus of observation?
Will the conceptual model be efficient or effective in describing the system?
Another function of the simulation conceptual model is to provide a rational and factual basis for assessment of simulation application appropriateness.
== Models in philosophy and science ==
=== Mental model ===
In cognitive psychology and philosophy of mind, a mental model is a representation of something in the mind, but a mental model may also refer to a nonphysical external model of the mind itself.
=== Metaphysical models ===
A metaphysical model is a type of conceptual model which is distinguished from other conceptual models by its proposed scope; a metaphysical model intends to represent reality in the broadest possible way. This is to say that it explains the answers to fundamental questions such as whether matter and mind are one or two substances; or whether or not humans have free will.
=== Epistemological models ===
An epistemological model is a type of conceptual model whose proposed scope is the known and the knowable, and the believed and the believable.
=== Logical models ===
In logic, a model is a type of interpretation under which a particular statement is true. Logical models can be broadly divided into ones which only attempt to represent concepts, such as mathematical models; and ones which attempt to represent physical objects, and factual relationships, among which are scientific models.
Model theory is the study of (classes of) mathematical structures such as groups, fields, graphs, or even universes of set theory, using tools from mathematical logic. A system that gives meaning to the sentences of a formal language is called a model for the language. If a model for a language moreover satisfies a particular sentence or theory (set of sentences), it is called a model of the sentence or theory. Model theory has close ties to algebra and universal algebra.
=== Mathematical models ===
Mathematical models can take many forms, including but not limited to dynamical systems, statistical models, differential equations, or game theoretic models. These and other types of models can overlap, with a given model involving a variety of abstract structures.
=== Scientific models ===
A scientific model is a simplified abstract view of a complex reality. A scientific model represents empirical objects, phenomena, and physical processes in a logical way. Attempts to formalize the principles of the empirical sciences use an interpretation to model reality, in the same way logicians axiomatize the principles of logic. The aim of these attempts is to construct a formal system that will not produce theoretical consequences that are contrary to what is found in reality. Predictions or other statements drawn from such a formal system mirror or map the real world only insofar as these scientific models are true.
== Statistical models ==
A statistical model is a probability distribution function proposed as generating data. In a parametric model, the probability distribution function has variable parameters, such as the mean and variance in a normal distribution, or the coefficients for the various exponents of the independent variable in linear regression. A nonparametric model has a distribution function without parameters, such as in bootstrapping, and is only loosely confined by assumptions. Model selection is a statistical method for selecting a distribution function within a class of them; e.g., in linear regression where the dependent variable is a polynomial of the independent variable with parametric coefficients, model selection is selecting the highest exponent, and may be done with nonparametric means, such as with cross validation.
In statistics there can be models of mental events as well as models of physical events. For example, a statistical model of customer behavior is a model that is conceptual (because behavior is physical), but a statistical model of customer satisfaction is a model of a concept (because satisfaction is a mental not a physical event).
== Social and political models ==
=== Economic models ===
In economics, a model is a theoretical construct that represents economic processes by a set of variables and a set of logical and/or quantitative relationships between them. The economic model is a simplified framework designed to illustrate complex processes, often but not always using mathematical techniques. Frequently, economic models use structural parameters. Structural parameters are underlying parameters in a model or class of models. A model may have various parameters and those parameters may change to create various properties.
== Models in systems architecture ==
A system model is the conceptual model that describes and represents the structure, behavior, and more views of a system. A system model can represent multiple views of a system by using two different approaches. The first one is the non-architectural approach and the second one is the architectural approach. The non-architectural approach respectively picks a model for each view. The architectural approach, also known as system architecture, instead of picking many heterogeneous and unrelated models, will use only one integrated architectural model.
=== Business process modelling ===
In business process modelling the enterprise process model is often referred to as the business process model. Process models are core concepts in the discipline of process engineering. Process models are:
Processes of the same nature that are classified together into a model.
A description of a process at the type level.
Since the process model is at the type level, a process is an instantiation of it.
The same process model is used repeatedly for the development of many applications and thus, has many instantiations.
One possible use of a process model is to prescribe how things must/should/could be done in contrast to the process itself which is really what happens. A process model is roughly an anticipation of what the process will look like. What the process shall be will be determined during actual system development.
== Models in information system design ==
=== Conceptual models of human activity systems ===
Conceptual models of human activity systems are used in soft systems methodology (SSM), which is a method of systems analysis concerned with the structuring of problems in management. These models are models of concepts; the authors specifically state that they are not intended to represent a state of affairs in the physical world. They are also used in information requirements analysis (IRA) which is a variant of SSM developed for information system design and software engineering.
=== Logico-linguistic models ===
Logico-linguistic modeling is another variant of SSM that uses conceptual models. However, this method combines models of concepts with models of putative real world objects and events. It is a graphical representation of modal logic in which modal operators are used to distinguish statement about concepts from statements about real world objects and events.
=== Data models ===
==== Entity–relationship model ====
In software engineering, an entity–relationship model (ERM) is an abstract and conceptual representation of data. Entity–relationship modeling is a database modeling method, used to produce a type of conceptual schema or semantic data model of a system, often a relational database, and its requirements in a top-down fashion. Diagrams created by this process are called entity-relationship diagrams, ER diagrams, or ERDs.
Entity–relationship models have had wide application in the building of information systems intended to support activities involving objects and events in the real world. In these cases they are models that are conceptual. However, this modeling method can be used to build computer games or a family tree of the Greek Gods, in these cases it would be used to model concepts.
==== Domain model ====
A domain model is a type of conceptual model used to depict the structural elements and their conceptual constraints within a domain of interest (sometimes called the problem domain). A domain model includes the various entities, their attributes and relationships, plus the constraints governing the conceptual integrity of the structural model elements comprising that problem domain. A domain model may also include a number of conceptual views, where each view is pertinent to a particular subject area of the domain or to a particular subset of the domain model which is of interest to a stakeholder of the domain model.
Like entity–relationship models, domain models can be used to model concepts or to model real world objects and events.
== See also ==
== References ==
== Further reading ==
J. Parsons, L. Cole (2005), "What do the pictures mean? Guidelines for experimental evaluation of representation fidelity in diagrammatical conceptual modeling techniques", Data & Knowledge Engineering 55: 327–342; doi:10.1016/j.datak.2004.12.008
A. Gemino, Y. Wand (2005), "Complexity and clarity in conceptual modeling: Comparison of mandatory and optional properties", Data & Knowledge Engineering 55: 301–326; doi:10.1016/j.datak.2004.12.009
D. Batra (2005), "Conceptual Data Modeling Patterns", Journal of Database Management 16: 84–106
Papadimitriou, Fivos. (2010). "Conceptual Modelling of Landscape Complexity". Landscape Research, 35(5):563-570. doi:10.1080/01426397.2010.504913
== External links ==
Models article in the Internet Encyclopedia of Philosophy | Wikipedia/Abstract_model |
A local area network (LAN) is a computer network that interconnects computers within a limited area such as a residence, campus, or building, and has its network equipment and interconnects locally managed. LANs facilitate the distribution of data and sharing network devices, such as printers.
The LAN contrasts the wide area network (WAN), which not only covers a larger geographic distance, but also generally involves leased telecommunication circuits or Internet links. An even greater contrast is the Internet, which is a system of globally connected business and personal computers.
Ethernet and Wi-Fi are the two most common technologies used for local area networks; historical network technologies include ARCNET, Token Ring, and LocalTalk.
== Cabling ==
Most wired network infrastructures utilize Category 5 or Category 6 twisted pair cabling with RJ45 compatible terminations. This medium provides physical connectivity between the Ethernet interfaces present on a large number of IP-aware devices. Depending on the grade of cable and quality of installation, speeds of up to 10 Mbit/s, 100 Mbit/s, 1 Gbit/s, or 10 Gbit/s are supported.
== Wireless LAN ==
In a wireless LAN, users have unrestricted movement within the coverage area. Wireless networks have become popular in residences and small businesses because of their ease of installation, convenience, and flexibility. Most wireless LANs consist of devices containing wireless radio technology that conforms to 802.11 standards as certified by the IEEE. Most wireless-capable residential devices operate at both the 2.4 GHz and 5 GHz frequencies and fall within the 802.11n or 802.11ac standards. Some older home networking devices operate exclusively at a frequency of 2.4 GHz under 802.11b and 802.11g, or 5 GHz under 802.11a. Some newer devices operate at the aforementioned frequencies in addition to 6 GHz under Wi-Fi 6E. Wi-Fi is a marketing and compliance certification for IEEE 802.11 technologies. The Wi-Fi Alliance has tested compliant products, and certifies them for interoperability. The technology may be integrated into smartphones, tablet computers and laptops. Guests are often offered Internet access via a hotspot service.
== Infrastructure and technicals ==
Simple LANs in office or school buildings generally consist of cabling and one or more network switches; a switch is used to allow devices on a LAN to talk to one another via Ethernet. A switch can be connected to a router, cable modem, or ADSL modem for Internet access. LANs at residential homes usually tend to have a single router and often may include a wireless repeater. A LAN can include a wide variety of other network devices such as firewalls, load balancers, and network intrusion detection. A wireless access point is required for connecting wireless devices to a network; when a router includes this device, it is referred to as a wireless router.
Advanced LANs are characterized by their use of redundant links with switches using the Spanning Tree Protocol to prevent loops, their ability to manage differing traffic types via quality of service (QoS), and their ability to segregate traffic with VLANs. A network bridge binds two different LANs or LAN segments to each other, often in order to grant a wired-only device access to a wireless network medium.
Network topology describes the layout of interconnections between devices and network segments. At the data link layer and physical layer, a wide variety of LAN topologies have been used, including ring, bus, mesh and star. The star topology is the most common in contemporary times. Wireless LAN (WLAN) also has its topologies: independent basic service set (IBSS, an ad-hoc network) where each node connects directly to each other (this is also standardized as Wi-Fi Direct), or basic service set (BSS, an infrastructure network that uses an wireless access point).
=== Network layer configuration ===
DHCP is used to assign internal IP addresses to members of a local area network. A DHCP server typically runs on the router with end devices as its clients. All DHCP clients request configuration settings using the DHCP protocol in order to acquire their IP address, a default route and one or more DNS server addresses. Once the client implements these settings, it will be able to communicate on that internet.
=== Protocols ===
At the higher network layers, protocols such as NetBIOS, IPX/SPX, AppleTalk and others were once common, but the Internet protocol suite (TCP/IP) has prevailed as the standard of choice for almost all local area networks today.
=== Connection to other LANs ===
LANs can maintain connections with other LANs via leased lines, leased services, or across the Internet using virtual private network technologies. Depending on how the connections are established and secured, and the distance involved, such linked LANs may also be classified as a metropolitan area network (MAN) or a wide area network (WAN).
=== Connection to the Internet ===
Local area networks may be connected to the Internet (a type of WAN) via fixed-line means (such as a DSL/ADSL modem) or alternatively using a cellular or satellite modem. These would additionally make use of telephone wires such as VDSL and VDSL2, coaxial cables, or fiber to the home for running fiber-optic cables directly into a house or office building, or alternatively a cellular modem or satellite dish in the latter non-fixed cases. With Internet access, the Internet service provider (ISP) would grant a single WAN-facing IP address to the network. A router is configured with the provider's IP address on the WAN interface, which is shared among all devices in the LAN by network address translation.
A gateway establishes physical and data link layer connectivity to a WAN over a service provider's native telecommunications infrastructure. Such devices typically contain a cable, DSL, or optical modem bound to a network interface controller for Ethernet. Home and small business class routers are often incorporated into these devices for additional convenience, and they often also have integrated wireless access point and 4-port Ethernet switch.
The ITU-T G.hn and IEEE Powerline standard, which provide high-speed (up to 1 Gbit/s) local area networking over existing home wiring, are examples of home networking technology designed specifically for IPTV delivery.
== History and development of LAN ==
=== Early installations ===
The increasing demand and usage of computers in universities and research labs in the late 1960s generated the need to provide high-speed interconnections between computer systems. A 1970 report from the Lawrence Radiation Laboratory detailing the growth of their "Octopus" network gave a good indication of the situation.
A number of experimental and early commercial LAN technologies were developed in the 1970s. Ethernet was developed at Xerox PARC between 1973 and 1974. The Cambridge Ring was developed at Cambridge University starting in 1974. ARCNET was developed by Datapoint Corporation in 1976 and announced in 1977. It had the first commercial installation in December 1977 at Chase Manhattan Bank in New York. In 1979, the electronic voting system for the European Parliament was the first installation of a LAN connecting hundreds (420) of microprocessor-controlled voting terminals to a polling/selecting central unit with a multidrop bus with Master/slave (technology) arbitration. It used 10 kilometers of simple unshielded twisted pair category 3 cable—the same cable used for telephone systems—installed inside the benches of the European Parliament Hemicycles in Strasbourg and Luxembourg.
The development and proliferation of personal computers using the CP/M operating system in the late 1970s, and later DOS-based systems starting in 1981, meant that many sites grew to dozens or even hundreds of computers. The initial driving force for networking was to share storage and printers, both of which were expensive at the time. There was much enthusiasm for the concept, and for several years, from about 1983 onward, computer industry pundits habitually declared the coming year to be, "The year of the LAN".
=== Competing standards ===
In practice, the concept was marred by the proliferation of incompatible physical layer and network protocol implementations, and a plethora of methods of sharing resources. Typically, each vendor would have its own type of network card, cabling, protocol, and network operating system. A solution appeared with the advent of Novell NetWare which provided even-handed support for dozens of competing card and cable types, and a much more sophisticated operating system than most of its competitors.
Of the competitors to NetWare, only Banyan Vines had comparable technical strengths, but Banyan never gained a secure base. 3Com produced 3+Share and Microsoft produced MS-Net. These then formed the basis for collaboration between Microsoft and 3Com to create a simple network operating system LAN Manager and its cousin, IBM's LAN Server. None of these enjoyed any lasting success; Netware dominated the personal computer LAN business from early after its introduction in 1983 until the mid-1990s when Microsoft introduced Windows NT.
In 1983, TCP/IP was first shown capable of supporting actual defense department applications on a Defense Communication Agency LAN testbed located at Reston, Virginia. The TCP/IP-based LAN successfully supported Telnet, FTP, and a Defense Department teleconferencing application. This demonstrated the feasibility of employing TCP/IP LANs to interconnect Worldwide Military Command and Control System (WWMCCS) computers at command centers throughout the United States. However, WWMCCS was superseded by the Global Command and Control System (GCCS) before that could happen.
During the same period, Unix workstations were using TCP/IP networking. Although the workstation market segment is now much reduced, the technologies developed in the area continue to be influential on the Internet and in all forms of networking—and the TCP/IP protocol has replaced IPX, AppleTalk, NBF, and other protocols used by the early PC LANs.
Econet was Acorn Computers's low-cost local area network system, intended for use by schools and small businesses. It was first developed for the Acorn Atom and Acorn System 2/3/4 computers in 1981.
=== Further development ===
In the 1980s, several token ring network implementations for LANs were developed. IBM released its own implementation of token ring in 1985, It ran at 4 Mbit/s. IBM claimed that their token ring systems were superior to Ethernet, especially under load, but these claims were debated; while the slow but inexpensive AppleTalk was popular for Macs, in 1987 InfoWorld said, "No LAN has stood out as the clear leader, even in the IBM world". IBM's implementation of token ring was the basis of the IEEE 802.5 standard. A 16 Mbit/s version of Token Ring was standardized by the 802.5 working group in 1989. IBM had market dominance over Token Ring, for example, in 1990, IBM equipment was the most widely used for Token Ring networks.
Fiber Distributed Data Interface (FDDI), a LAN standard, was considered an attractive campus backbone network technology in the early to mid 1990s since existing Ethernet networks only offered 10 Mbit/s data rates and Token Ring networks only offered 4 Mbit/s or 16 Mbit/s rates. Thus it was a relatively high-speed choice of that era, with speeds such as 100 Mbit/s.
By 1994, vendors included Cisco Systems, National Semiconductor, Network Peripherals, SysKonnect (acquired by Marvell Technology Group), and 3Com. FDDI installations have largely been replaced by Ethernet deployments.
== See also ==
Asynchronous Transfer Mode
Chaosnet
LAN messenger
LAN party
Network interface controller
== References ==
== External links ==
Media related to Local area networks (LAN) at Wikimedia Commons | Wikipedia/Local_area_networks |
The Systems Engineering Body of Knowledge (SEBoK), formally known as Guide to the Systems Engineering Body of Knowledge, is a wiki-based collection of key knowledge sources and references for systems engineering. The SEBoK is a curated wiki meaning that the content is managed by an editorial board, and updated on a regular basis. This wiki is a collaboration of three organizations: 1) International Council on Systems Engineering (INCOSE), 2) IEEE Systems Council, and 3) Stevens Institute of Technology. The most recent version (v.2.11) was released on November 25, 2024.
== History ==
The Guide was developed over three years, from 2009 to 2012, through the contributions of 70 authors worldwide. During this period, three prototype versions were created. The first prototype (v.0.25) was a document that was released for review in September 2010. However, the final versions were all published online as agreed by the authors in January 2011. This switch to a wiki-based SEBoK began with v.0.50.
The first version of the SEBoK for public use was published online in September 2012. The initial release was named 2012 product of the year by the International Council on Systems Engineering. Since then, the guide had several revisions and minor updates leading to the 23rd release, as of Nov 2024. Version 1.7, released on October 27, 2016, added a new Healthcare Systems Engineering knowledge area.
== Knowledge areas ==
According to the site, the guide has a total of 26 knowledge areas distributed among the different parts. However, the majority of these knowledge areas can be grouped to form nine general knowledge areas. The general and specific knowledge areas are:
Science & Technology Knowledge
Introduction to Life Cycle Processes
Life Cycle Models
Concept Definition
Domain Technology Knowledge
System Definition
System Realization
System Deployment and Use
Operational Environment Knowledge
Engineering Discipline/ Specialty Knowledge
Systems Engineering and Software Engineering
Systems Engineering and Project Management
Systems Engineering and Industrial Engineering
Systems Engineering and Specialty Engineering
Sector & Enterprise Knowledge
Product Systems Engineering
Service Systems Engineering
Enterprise Systems Engineering
Systems of Systems (SoS)
Healthcare Systems Engineering
Management & Leadership Knowledge
Enabling Businesses and Enterprises
Enabling Teams
Enabling Individuals
Systems Engineering Management
Product and Service Life Management
Education & Training Knowledge
People & Competency Knowledge
Systems Engineering Standards
Social/ Systems Science Knowledge
Systems Fundamentals
Systems Science
Systems Thinking
Representing Systems with Models
Systems Approach Applied to Engineered Systems
== References ==
== External links ==
Guide to the Systems Engineering Body of Knowledge (SEBoK) | Wikipedia/Systems_Engineering_Body_of_Knowledge |
Computer Sciences Corporation (CSC) was an American multinational corporation that provided information technology (IT) services and professional services. On April 3, 2017, it merged with the Enterprise Services line of business of HP Enterprise (formerly Electronic Data Systems) to create DXC Technology.
== History ==
CSC was founded in April 1959 in Los Angeles, California, by Roy Nutt and Fletcher Jones. CSC initially provided programming tools such as assembler and compiler software.
In the 1960s, CSC provided software programming services to major computer manufacturers like IBM and Honeywell and secured their first contracts for the U.S. public sector with NASA (among others).
By 1963, CSC became the largest software company in the United States and the first software company to be listed on the American Stock Exchange. By the end of 1968, CSC was listed on the New York Stock Exchange and had operations in Canada, India, the United Kingdom, Germany, Spain, Italy, Brazil, and the Netherlands.
In 1967, CSC set up Computicket Corp. to compete in the fledgling electronic ticket market competing with Ticketron but lost $13 million and discontinued the service in 1970.
In the 1970s and 1980s, CSC expanded globally winning large contracts for the finance and defense industries and through acquisitions in Europe and Australia.
In 2000, CSC founded a joint-venture called Innovative Banking Solutions AG in Wiesbaden, Germany, to market their newly developed SAP solution for mortgage companies.
Since its beginnings in 1959, company headquarters had been in California. On March 29, 2008, the corporate headquarters of the company were relocated from El Segundo, California, to Falls Church, Virginia.
CSC had been a Fortune 500 Company since 1995, coming in at 162 in the 2012 rankings.
In fiscal 2013, CSC acquired ServiceMesh (cloud management) for $282M, Infochimps (a big data platform) for $27M, 42Six (analytics for national intelligence) for $35 million, iSOFT (application solutions) for cash and debt, and AppLabs (application testing) for $171M.
In May 2015, CSC announced plans to split the public sector business from its commercial and international business. In August, it was announced that CSC's Government Service business would merge with SRA International to form a new company — CSRA—at the end of November 2015.
In July 2015, CSC and HCL Technologies announced the signing of a joint venture agreement to form a banking software and services company, Celeriti FinTech.
In September 2015, CSC closed the acquisition of Fixnetix, a provider of front-office managed trading solutions in capital markets. CSC also acquired Fruition Partners, a provider of technology-enabled solutions for the service-management sector during the month.
In November 2015, CSC agreed to acquire the shares of UXC, an IT services company based in Australia in a deal valued at A$427.6 million (US$309 million).
In December 2015, business technology and services provider, Xchanging, agreed to be purchased by CSC.
In February 2016, CSC announced it was moving its headquarters to Tysons in Fairfax County, Virginia.
On April 3, 2017, it merged with HPE Enterprise Services to create DXC Technology.
== Business ==
CSC once ranked among the leading IT service providers in the world. Geographically, CSC had major operations throughout North America, Europe, Asia, and Australia.
The company operated in three broad service lines or sectors until the 2015 divestment of NPS, its public sector:
North American Public Sector (NPS): Since 1961, CSC had been one of the major IT service providers for the U.S. federal government. CSC provided services to the United States Department of Defense, law enforcement and intelligence agencies (FBI, CIA, Homeland Security), aeronautics and aerospace agencies (NASA). In 2012, U.S. federal contracts accounted for 36% of CSC total revenue.
Managed Services
Business Solutions and Services
The company made several acquisitions, including DynCorp in 2003 and Covansys Corporation in 2007.
== Awards and recognition ==
In September 2012, CSC was ranked 8th in Software Magazine’s Software 500 ranking of the world’s largest software and service providers.
== Criticism ==
In June 2013, Margaret Hodge, chair of the Public Accounts Committee, a Select committee of the British House of Commons, described CSC as a "rotten company providing a hopeless system" with reference to their multibillion-pound contract to deliver the National Programme for IT Lorenzo contract.
In December 2011, the non-partisan organization Public Campaign criticized CSC for spending US$4.39 million on lobbying and not paying any taxes during 2008–10, instead getting US$305 million in tax rebates, despite making a profit of US$1.67 billion.
In February 2011, the U.S. Securities and Exchange Commission (SEC) launched a fraud investigation into CSC's accounting practices in Denmark and Australian business. CSC's CFO Mike Mancuso confirmed that accounting errors and intentional misconduct by certain personnel in Australia prompted SEC regulators to turn their gaze to Australia. Mancuso also stated that the alleged misconduct includes US$19 million in both intentional accounting irregularities and unintentional accounting errors. The SEC accused the former CEO Mike Laphen of fraud and clawed back $4,35 million
The company was accused of breaching human rights by arranging several illegal rendition flights for the CIA between 2003 and 2006, which also led to criticism of shareholders of the company, including the governments of Norway and Britain.
The company engaged in a number of activities that resulted in legal actions against it. These are:
Its so-called WorldBridge Service (Visa Services), which processed and issued millions of visa applications to enter Britain, did not involve British authorities.
In 1998, CSC was the prime contractor hired by the Internal Revenue Service to modernize its tax-filing system. They told the IRS it would meet a January 2006 deadline, but failed to do so, leaving the IRS with no system capable of detecting fraud. Its failure to meet the delivery deadline for developing an automated refund fraud detection system cost the IRS between US$200 million and US$300 million.
== See also ==
VP/MS (Visual Product Modeling System), a modeling language and product lifecycle management tool by CSC
Top 100 US Federal Contractors
CSRA Inc., formed by a merger of CSC's North American Public Sector and SRA International
Team CSC and other names 2003-2010. Professional cycling sponsorship under team owner Bjarne Riis.
== References ==
== External links ==
Official website
Computer Sciences Corporation SEC Filings | Wikipedia/Computer_Sciences_Corporation |
Computer science is one of several academic events sanctioned by the University Interscholastic League (UIL).
Computer science is designed to test students' programming abilities. It is not the same as the Computer Applications contest, which tests students' abilities to use word processing, spreadsheet, and database applications software, including integration of applications.
Computer science began during the 1990-91 scholastic year as strictly a team event. It was not scored as an individual event until the 1996-97 school year.
== Eligibility ==
Students in Grade 9 through Grade 12 are eligible to enter this event.
Each school may send up to four students. However, in districts with eight or more schools the number of students per school may be limited to three. In order for the school to compete in the team competition the school must send three students.
== Rules and Scoring ==
The contest consists of two parts, a written test and a programming exercise.
On the written test, 45 minutes are allotted. Time warnings are not required but can be given. A timer should be present at the competition, which can be easily seen by all contestants. At the end of the 45 minutes the student may finish completing an answer. Six points are given for each correct answer; two points are deducted for each incorrect answer. Skipped or unanswered questions are not scored.
On the programming test, two hours are allotted. The solution is graded as correct or incorrect with points assigned for each problem. However, incorrect solutions may be reworked by the team. Any commercially available computer may be used in the competition. The programming language to be used is limited to Java and the compiler used for the contest will be the Oracle Java Development Kit; specific acceptable versions are determined by the UIL prior to each school year.
== Determining the Winner ==
The top three individuals and the top team will advance to the next round. In addition, within each region, the highest-scoring second place team from all district competitions advances as the "wild card" to regional competition, and within the state, the highest-scoring second place team from all regional competitions advances as the wild card to the state competition. Members of advancing teams who did not place individually remain eligible to compete for individual awards at higher levels.
For individual competition (overall and for each subsection), the tiebreaker is percent accuracy (number of problems answered correctly divided by number of problems attempted, defined as any question with a mark or erasure in the answer blank). In the event a tie remains, all remaining individuals will advance.
For the team competition the first tiebreaker is the programming score, then the written exam score (using the total score tiebreaker system used at the district level). If a tie still exists, all remaining tied teams will advance or place.
For district meet academic championship and district meet sweepstakes awards, points are awarded to the school as follows:
Individual places: 1st—15, 2nd—12, 3rd—10, 4th—8, 5th—6, and 6th—4.
Team places (district): 1st—10 and 2nd—5.
Team places (regional and state): 1st—20, 2nd—16, and 3rd—12.
The maximum number of points a school may earn in Computer Science is 37 at the district level and 42 at the regional and state levels.
== List of prior winners ==
=== Individual ===
NOTE: For privacy reasons, only the winning school is shown. Computer Science was strictly a team event until the 1996-97 school year.
=== Team ===
NOTE: The 1990-91 contest was limited to Class AAAA and Class AAAAA only; other classifications were not added until the 1991-92 year. The AAAAAA classification was not added until the 2014-2015 year.
== References ==
Official UIL Rules for Computer Science--High School NOTE: This file contains rules for other competitions; Section 928 covers Computer Science.
Study materials from Mike Scott, previous Comp Sci UIL director NOTE: This link contains study materials from Mike Scott, the previous UIL CS director.
2010-2011 Topic List for CS UIL NOTE: This link contains study materials from Mike Scott, the previous UIL CS director.
|} | Wikipedia/Computer_Science_(UIL) |
Computer Science is a peer-reviewed scientific journal published by the AGH University of Science and Technology (Kraków Poland) and edited by faculty members of the Departments of Computer Science and Automatics. The journal was established in 1999 and since beginning of 2012 is published quarterly. The editor-in-chief is Jacek Kitowski.
== Scope ==
The journal publishes articles covering all aspects of theoretical and applied computer science problems.
== Special issues ==
Occasionally the journal will publish special issues containing articles based on presentations at selected conferences.
== Scoring by the Polish Ministry of Science and Higher Education ==
Scoring assigned by the Polish Ministry of Science and Higher Education, as one of important factors used to evaluate research facilities in Poland, had following
values for Computer Science journal:
7.0 (from 2012)
6.0 (2011),
2.0 (2010 and before).
== References ==
== External links ==
Official website | Wikipedia/Computer_Science_(journal) |
A message is a unit of communication that conveys information from a sender to a receiver. It can be transmitted through various forms, such as spoken or written words, signals, or electronic data, and can range from simple instructions to complex information.
The consumption of the message relies on how the recipient interprets the message, there are times where the recipient contradicts the intention of the message which results in a boomerang effect. Message fatigue is another outcome recipients can obtain if a message is conveyed too much by the source.
One example of a message is a press release, which may vary from a brief report or statement released by a public agency to commercial publicity material. Another example of a message is how they are portrayed to a consumer via an advertisement.
== History ==
== Roles in human communication ==
In communication between humans, messages can be verbal or nonverbal:
A verbal message is an exchange of information using words. Examples include face-to-face communication, telephone calls, voicemails, emails, etc.
A nonverbal message is communicated through actions or behaviors rather than words, such as conscious or unconscious body language.
The phrase "send a message" or "sending a message" is also used for actions taken by a party to convey that party's attitude towards a certain thing. For example, a government that executes people who commit acts of treason is sending a message that treason will not be tolerated. Conversely, a party that appears through its actions to endorse something that it opposes can be said to be "sending the wrong message", while one which appears to simultaneously endorse contradictory things can be said to be sending "mixed messages".
== In computer science ==
=== Events vs. Messages ===
In distributed systems, events represent a fact or state change (e.g., OrderPlaced) and are typically broadcast asynchronously to multiple consumers, promoting loose coupling and scalability. While events generally don’t expect an immediate response, acknowledgment mechanisms are often implemented at the infrastructure level (e.g., Kafka commit offsets, SNS delivery statuses) rather than being an inherent part of the event pattern itself.
In contrast, messages serve a broader role, encompassing commands (e.g., ProcessPayment), events (e.g., PaymentProcessed), and documents (e.g., DataPayload). Both events and messages can support various delivery guarantees, including at-least-once, at-most-once, and exactly-once, depending on the technology stack and implementation. However, exactly-once delivery is often achieved through idempotency mechanisms rather than true, infrastructure-level exactly-once semantics.
Delivery patterns for both events and messages include publish/subscribe (one-to-many) and point-to-point (one-to-one). While request/reply is technically possible, it is more commonly associated with messaging patterns rather than pure event-driven systems. Events excel at state propagation and decoupled notifications, while messages are better suited for command execution, workflow orchestration, and explicit coordination.
Modern architectures commonly combine both approaches, leveraging events for distributed state change notifications and messages for targeted command execution and structured workflows based on specific timing, ordering, and delivery requirements.
== See also ==
== References ==
== External links ==
Media related to Messages at Wikimedia Commons
The dictionary definition of message at Wiktionary
Quotations related to Message at Wikiquote | Wikipedia/Message_(computer_science) |
Component Object Model (COM) is a binary-interface technology for software components from Microsoft that enables using objects in a language-neutral way between different programming languages, programming contexts, processes and machines.
COM is the basis for other Microsoft domain-specific component technologies including OLE, OLE Automation, ActiveX, COM+, and DCOM as well as implementations such as DirectX, Windows shell, UMDF, Windows Runtime, and Browser Helper Object.
COM enables object use with only knowing its interface; not its internal implementation. The component implementer defines interfaces that are separate from the implementation.
Support for multiple programming contexts is handled by relying on the object for aspects that would be challenging to implement as a facility. Supporting multiple uses of an object is handled by requiring each object to destroy itself via reference-counting. Access to an object's interfaces (similar to Type conversion) is provided by each object as well.
COM is available only in Microsoft Windows and Apple's Core Foundation 1.3 and later plug-in application programming interface (API). The latter only implements a subset of the whole COM interface.
Over time, COM is being replaced with other technologies such as Microsoft .NET and web services (i.e. via WCF). However, COM objects can be used in a .NET language via COM Interop.
COM is similar to other component technologies such as SOM, CORBA and Enterprise JavaBeans, although each has its strengths and weaknesses.
Unlike C++, COM provides a stable application binary interface (ABI) that is unaffected by compiler differences. This makes using COM advantageous for object-oriented C++ libraries that are to be used by clients compiled via different compilers.
== History ==
Introduced in 1987, Dynamic Data Exchange (DDE) was one of the first interprocess communication technologies in Windows. It allowed sending and receiving messages in so-called conversations between applications.
Antony Williams, involved in architecting COM, distributed two papers within Microsoft that embraced the concept of software components: Object Architecture: Dealing With the Unknown – or – Type Safety in a Dynamically Extensible Class Library in 1988 and On Inheritance: What It Means and How To Use It in 1990. These provided the foundation of many of the ideas behind COM.
Object Linking and Embedding (OLE), Microsoft's first object-based framework, was built on DDE and designed specifically for compound documents. It was introduced with Word and Excel in 1991, and was later included with Windows, starting with version 3.1 in 1992. An example of a compound document is a spreadsheet embedded in a Word document. As changes are made to the spreadsheet in Excel, they appear automatically in the Word document.
In 1991, Microsoft introduced the Visual Basic Extension (VBX) technology with Visual Basic 1.0. A VBX is a packaged extension in the form of a dynamic-link library (DLL) that allows objects to be graphically placed in a form and manipulated by properties and methods. These were later adapted for use by other languages such as Visual C++. Windows 3.1 integrated OLE 1.0.
In 1992, Microsoft released OLE 2 with its new underlying object model, COM. The COM application binary interface (ABI) was the same as the MAPI ABI (released in 1992), and like it was based on MSRPC and ultimately on the Open Group's DCE/RPC. COM was created to replace DDE since its text-based conversation and Windows messaging design was not flexible enough to allow sharing application features in a robust and extensible way. The COM introduced UUID as identifier.
In 1994, the OLE custom control (OCX) technology, based on COM, was introduced as the successor to VBX. At the same time, Microsoft stated that OLE 2 would be known simply as "OLE". Windows NT 3.5 and Windows 95 integrated OLE 2.0.
In early 1996, Microsoft found a new use for OCX – extending their web browser's capability. Microsoft renamed some parts of OLE relating to the Internet as ActiveX, and gradually renamed all OLE technologies to ActiveX, except the compound document technology that was used in Microsoft Office.
Later in 1996, Microsoft extended COM to work across the network with DCOM.
== Related technologies ==
=== MSRPC ===
The COM IDL is based on the feature-rich DCE/RPC IDL, with object-oriented extensions. Microsoft's implementation of DCE/RPC, MSRPC, is used as the primary inter-process communication mechanism for Windows NT services and internal components, making it an obvious choice of foundation.
=== DCOM ===
DCOM extends COM from merely supporting a single user with separate applications communicating on the Windows desktop, to activating objects running under different security contexts, and on different machines across the network. With this were added necessary features for configuring which users have authority to create, activate and call objects, for identifying the calling user, as well as specifying required encryption for security of calls.
=== COM+ ===
Microsoft introduced Microsoft Transaction Server (MTS) in Windows NT 4 in order to provide developers with support for distributed transactions, resource pooling, disconnected applications, event publication and subscription, better memory and processor (thread) management, as well as to position Windows as an alternative to other enterprise-level operating systems.
Renamed to COM+ in Windows 2000, the feature set was incorporated into the operating system as opposed to the series of external tools provided by MTS. At the same time, Microsoft de-emphasized DCOM as a separate entity. Components that used COM+ were handled more directly by the added layer of COM+; in particular by operating system support for interception. In the first release of MTS, interception was tacked on – installing an MTS component would modify the Windows Registry to call the MTS software, and not the component directly.
Windows 2000 included Component Services control panel updates for configuring COM+ components.
An advantage of COM+ was that it could be run in "component farms". Instances of a component, if coded properly, could be pooled and reused by new calls to its initializing routine without unloading it from memory. Components could also be distributed (called from another machine). COM+ and Microsoft Visual Studio provided tools to make it easy to generate client-side proxies, so although DCOM was used to make the remote call, it was easy to do for developers. COM+ also introduced a subscriber/publisher event mechanism called COM+ Events, and provided a new way of leveraging MSMQ (a technology that provides inter-application asynchronous messaging) with components called Queued Components. COM+ events extend the COM+ programming model to support late-bound (see Late binding) events or method calls between the publisher or subscriber and the event system.
=== .NET ===
.NET is Microsoft's component technology that supersedes COM. .NET hides many details of component creation and therefore eases development.
.NET provides wrappers to commonly used COM controls.
.NET can leverage COM+ via the System.EnterpriseServices namespace, and several of the services that COM+ provides have been duplicated in .NET. For example, the System.Transactions namespace provides the TransactionScope class, which provides transaction management without resorting to COM+. Similarly, queued components can be replaced by Windows Communication Foundation (WCF) with an MSMQ transport.
There is limited support for backward compatibility. A COM object may be used in .NET by implementing a Runtime Callable Wrapper (RCW). NET objects that conform to certain interface restrictions may be used in COM objects by calling a COM callable wrapper (CCW). From both the COM and .NET sides, objects using the other technology appear as native objects. See COM Interop.
WCF eases a number of COM's remote execution challenges. For instance, it allows objects to be transparently marshalled by value across process or machine boundaries more easily.
=== Windows Runtime ===
Windows Runtime (WinRT) is a COM-based API, albeit an enhanced COM variant. Because of its COM-like basis, WinRT supports interfacing from multiple programming contexts, but it is an unmanaged, native API. The API definitions are stored in ".winmd" files, which are encoded in ECMA 335 metadata format; the same CLI metadata format that .NET uses with a few modifications. This metadata format allows for significantly lower overhead than P/Invoke when WinRT is invoked from .NET applications.
=== Nano-COM ===
Nano-COM is a subset of COM focused on the application binary interface (ABI) aspects of COM that enable function and method calls across independently compiled modules/components. Nano-COM can be expressed in a portable C++ header file. Nano-COM extends the native ABI of the underlying instruction architecture and OS to support typed object references – whereas a typical ABI focuses on atomic types, structures, arrays and function calling conventions.
A Nano-COM header file defines or names at least three types:
GUID – identifies an interface type
HRESULT – method result codes such as S_OK, E_FAIL, E_OUTOFMEMORY
IUnknown – base type for object references; abstract virtual functions to support dynamic_cast<T>-style acquisition of new interface types and ref counting a la shared_ptr<T>
Many uses of Nano-COM define two functions to address callee-allocated memory buffers as results:
<NanoCom>Alloc – called by method implementations to allocate raw buffers (not objects) that are returned to the caller
<NanoCom>Free – called by method callers to free callee-allocated buffers when no longer in use
Some implementations of Nano-COM such as Direct3D eschew the allocator functions and restrict themselves to only use caller-allocated buffers.
Nano-COM has no notion of classes, apartments, marshaling, registration, etc. Rather, object references are simply passed across function boundaries and allocated via standard language constructs (e.g., C++ new operator).
The basis of Nano-COM was used by Mozilla to bootstrap Firefox (called XPCOM), and is currently in use as the base ABI technology for DirectX/Direct3D/DirectML.
== Security ==
=== In Internet Explorer ===
Since an ActiveX control (any COM component) runs as native code, with no sandboxing protection, there are few restrictions on what it can do. Using ActiveX components, as Internet Explorer supported, in a web page lead to problems with malware infections.
Microsoft recognized the problem as far back as 1996 when Charles Fitzgerald said, "We never made the claim up front that ActiveX is intrinsically secure". Later versions of Internet Explorer prompt the user before installing an ActiveX control, allowing them to block installation.
As a level of protection, an ActiveX control is signed with a digital signature to guarantee authenticity.
It is also possible to disable ActiveX controls altogether, or to allow only a selected few.
=== Process corruption ===
The transparent support for out-of-process COM servers promotes software safety in terms of process isolation. This can be useful for decoupling subsystems of large application into separate processes. Process isolation limits state corruption in one process from negatively affecting the integrity of the other processes, since they only communicate through strictly defined interfaces. Thus, only the affected subsystem needs to be restarted in order to regain valid state. This is not the case for subsystems within the same process, where a rogue pointer in one subsystem can randomly corrupt other subsystems.
== Binding ==
COM is supported via bindings in several languages, such as C, C++, Visual Basic, Delphi, Python and several of the Windows scripting contexts. Component access is via interface methods. This allows for direct calling in-process and via the COM/DCOM sub-system access between processes and computers.
== Type system ==
=== Coclass ===
A coclass, a COM class, implements one or more interfaces. It is identified by a class ID, called CLSID which is GUID, and by a human-readable programmatic identifier, called ProgID. A coclass is created via one of these identifiers.
=== Interface ===
Each COM interface extends the IUnknown interface, which exposes methods for reference counting and for accessing the other interfaces of the object – similar to type conversion, a.k.a. type casting.
An interface is identified by an interface ID (IID), a GUID.
A custom interface, anything derived from IUnknown, provides early bound access via a pointer to a virtual method table that contains a list of pointers to the functions that implement the functions declared in the interface, in the order they are declared. An in-process invocation overhead is, therefore, comparable to a C++ virtual method call.
Dispatching, a.k.a. late bound access, is provided by implementing IDispatch. Dispatching allows access from a wider range of programming contexts than a custom interface.
Like many object-oriented languages, COM provides a separation of interface from implementation. This distinction is especially strong in COM where an object has no default interface. A client must request an interface to have any access. COM supports multiple implementations of the same interface, so that clients can choose which implementation of an interface to use.
=== Type library ===
A COM type library defines COM metadata, such as coclasses and interfaces. A library can be defined as Interface definition language (IDL); a programming language independent syntax. IDL is similar to C++ with additional syntax for defining interfaces and coclasses. IDL also supports bracketed attributes before declarations to define metadata such as identifiers and relationships between parameters.
An IDL file is compiled via the MIDL compiler. For use with C/C++, the MIDL compiler generates a header file with struct definitions to match the vtbls of the declared interfaces and a C file containing declarations of the interface GUIDs. C++ source code for a proxy module can also be generated by the MIDL compiler. This proxy contains method stubs for converting COM calls into remote procedure calls to enable DCOM for out-of-process communication.
MIDL can generate a binary type library (TLB) that can be used by other tools to support access from other context.
=== Examples ===
The following IDL code declares a coclass named SomeClass which implements an interface named ISomeInterface.
This is conceptually equivalent to the following C++ code where ISomeInterface is a pure virtual class, a.k.a. abstract base class.
In C++, COM objects are instantiated via the COM subsystem CoCreateInstance function that takes the CLSID and IID. SomeClass can be created as follows:
== Reference counting ==
A COM object uses reference counting to manage object lifetime. An object's reference count is controlled by the clients through the IUnknown AddRef and Release methods. COM objects are responsible for freeing their own memory when the reference count drops to zero. Some programming contexts (e.g. Visual Basic) provide automatic reference counting to simplify object use. In C++, a smart pointer can be used to automate reference count management.
The following are guidelines for when to AddRef and Release should called:
A functions that returns an interface reference (via return value or via "out" parameter) increments the count of the returned object
Release is called before the interface pointer is overwritten or goes out of scope
If a copy is made on an interface reference pointer, AddRef is called
AddRef and Release are called on the interface which is being referenced (not a different interface of the same object) since an object may implement per-interface reference counts in order to allocate internal resources only for the interfaces which are being referenced
For remote objects, not all reference count calls are sent over the wire. A a proxy keeps only one reference on the remote object and maintains its own local reference count.
To simplify COM development for C++ developers, Microsoft introduced ATL (Active Template Library). ATL provides a relatively high-level COM development paradigm. It also shields COM client application developers from the need to directly maintain reference counting, by providing smart pointer types. Other libraries and languages that are COM-aware include the Microsoft Foundation Classes, the VC Compiler COM Support, VBScript, Visual Basic, ECMAScript (JavaScript) and Borland Delphi.
== Programming context ==
COM is a language agnostic binary standard that allows objects to be used in any programming context able to access its binary interfaces.
COM client software is responsible for enabling the COM sub-system, instantiating and reference-counting COM objects and querying objects for supported interfaces.
The Microsoft Visual C++ compiler supports extensions to the C++ language, referred to as C++ Attributes, that are designed to simplify COM development and minimize boilerplate code required to implement COM servers in C++.
== Type metadata storage ==
Originally, type library metadata was required to be stored in the system registry. A COM client would use the registry information for object creation.
Registration-free (RegFree) COM was introduced with Windows XP to allow storing type library metadata as an assembly manifest either as a resource in the executable file or in a separate file installed with the component. This allows multiple versions of the same component to be installed on the same computer, in different directories. And it allows for XCOPY deployment. This technology has limited support for EXE COM servers and cannot be used for system-wide components such as MDAC, MSXML, DirectX or Internet Explorer.
During application loading, the Windows loader searches for the manifest. If it is present, the loader adds information from it to the activation context. When the COM class factory tries to instantiate a class, the activation context is first checked to see if an implementation for the CLSID can be found. Only if the lookup fails, the registry is scanned.
A COM object can be created without type library information; with only a path to the DLL file and CLSID. A client can use the COM DLL function DllGetClassObject with the CLSID and IID_IClassFactory to create an instance of a factory object. The client can then use the factory object's CreateInstance to create an instance. This is the same process the COM sub-system uses. If an object created this way creates another object, it will do so in the usual way (using the registry or manifest). But it can create internal objects (which may not be registered at all), and hand out references to interfaces to them, using its own private knowledge.
== Marshalling ==
A COM object can be transparently created and used from within the same process (in-process), across process boundaries (out-of-process), or remotely over the network (DCOM). Out-of-process and remote objects use marshalling to serialize method calls and return values over process or network boundaries. This marshalling is invisible to the client, which accesses the object as if it were a local in-process object.
== Threading ==
In COM, threading is addressed through a concept known as apartments. An individual COM object lives in exactly one apartment, which might either be single-threaded or multi-threaded. There are three types of apartments in COM: Single-Threaded Apartment (STA), Multi-Threaded Apartment (MTA), and Thread Neutral Apartment (NA). Each apartment represents one mechanism whereby an object's internal state may be synchronized across multiple threads. A process can consist of multiple COM objects, some of which may use STA and others of which may use MTA. All threads accessing COM objects similarly live in one apartment. The choice of apartment for COM objects and threads are determined at run-time, and cannot be changed.
Threads and objects which belong to the same apartment follow the same thread access rules. Method calls which are made inside the same apartment are therefore performed directly without any assistance from COM. Method calls made across apartments are achieved via marshalling. This requires the use of proxies and stubs.
== Criticisms ==
=== Complexity ===
COM is relatively complex especially compared to more modern component technologies such as .NET.
=== Message pumping ===
When an STA is initialized it creates a hidden window that is used for inter-apartment and inter-process message routing. This window must have its message queue regularly "pumped". This construct is known as a "message pump". On earlier versions of Windows, failure to do so could cause system-wide deadlocks. This problem is complicated by some Windows APIs that initialize COM as part of their implementation, which causes a "leak" of implementation details.
=== Reference counting ===
Reference counting within COM may cause problems if two or more objects are circularly referenced. The design of an application must take this into account so that objects are not left orphaned. Objects may also be left with active reference counts if the COM "event sink" model is used. Since the object that fires the event needs a reference to the object reacting to the event, the latter's reference count will never reach zero. Reference cycles are typically broken using either out-of-band termination or split identities. In the out-of-band termination technique, an object exposes a method which, when called, forces it to drop its references to other objects, thereby breaking the cycle. In the split identity technique, a single implementation exposes two separate COM objects (also known as identities). This creates a weak reference between the COM objects, preventing a reference cycle.
=== DLL Hell ===
Because in-process COM components are implemented in DLL files and registration only allows for a single version per CLSID, they might in some situations be subject to the "DLL Hell" effect. Registration-free COM capability eliminates this problem for in-process components; registration-free COM is not available for out-of-process servers.
== See also ==
Calling convention – Ways subroutines get called in computers
Common Language Infrastructure – Open specification for runtime environments
D-Bus – Linux message-oriented middleware
Foreign function interface – Interface to call functions from other programming languages
Internet Communications Engine – Framework for remote procedure calls
Java remote method invocation – Java application-programming interface
KDE Frameworks – Collection of libraries and software frameworks for the Qt framework
Name mangling – Technique in compiler construction
Portable object (computing) – Object in distributed programming
SWIG – Open-source programming tool
== Notes ==
== References ==
"COM: A Brief Introduction (powerpoint)" (Direct link to PowerPoint (PPT) file). Retrieved March 7, 2006.
Box, Don (1998). Essential COM. Addison-Wesley. ISBN 978-0-201-63446-4.
Chappell, David (1996). Understanding ActiveX and OLE. Microsoft Press. ISBN 978-1-57231-216-6.
"Integration and Migration of COM+ services to WCF". Retrieved April 15, 2010.
== External links ==
Component Object Model on MSDN
Interview with Tony Williams, Co-Inventor of COM (Video Webcast, August 2006)
Info: Difference Between OLE Controls and ActiveX Controls from Microsoft
TypeLib Data Format Specification (unofficial) with open source dumper utility.
The COM / DCOM Glossary (archive.org) | Wikipedia/Component_Object_Model |
The Document Object Model (DOM) is a cross-platform and language-independent API that treats an HTML or XML document as a tree structure wherein each node is an object representing a part of the document. The DOM represents a document with a logical tree. Each branch of the tree ends in a node, and each node contains objects. DOM methods allow programmatic access to the tree; with them one can change the structure, style or content of a document. Nodes can have event handlers (also known as event listeners) attached to them. Once an event is triggered, the event handlers get executed.
The principal standardization of the DOM was handled by the World Wide Web Consortium (W3C), which last developed a recommendation in 2004. WHATWG took over the development of the standard, publishing it as a living document. The W3C now publishes stable snapshots of the WHATWG standard.
In HTML DOM (Document Object Model), every element is a node:
A document is a document node.
All HTML elements are element nodes.
All HTML attributes are attribute nodes.
Text inserted into HTML elements are text nodes.
Comments are comment nodes.
== History ==
The history of the Document Object Model is intertwined with the history of the "browser wars" of the late 1990s between Netscape Navigator and Microsoft Internet Explorer, as well as with that of JavaScript and JScript, the first scripting languages to be widely implemented in the JavaScript engines of web browsers.
JavaScript was released by Netscape Communications in 1995 within Netscape Navigator 2.0. Netscape's competitor, Microsoft, released Internet Explorer 3.0 the following year with a reimplementation of JavaScript called JScript. JavaScript and JScript let web developers create web pages with client-side interactivity. The limited facilities for detecting user-generated events and modifying the HTML document in the first generation of these languages eventually became known as "DOM Level 0" or "Legacy DOM." No independent standard was developed for DOM Level 0, but it was partly described in the specifications for HTML 4.
Legacy DOM was limited in the kinds of elements that could be accessed. Form, link and image elements could be referenced with a hierarchical name that began with the root document object. A hierarchical name could make use of either the names or the sequential index of the traversed elements. For example, a form input element could be accessed as either document.myForm.myInput or document.forms[0].elements[0].
The Legacy DOM enabled client-side form validation and simple interface interactivity like creating tooltips.
In 1997, Netscape and Microsoft released version 4.0 of Netscape Navigator and Internet Explorer respectively, adding support for Dynamic HTML (DHTML) functionality enabling changes to a loaded HTML document. DHTML required extensions to the rudimentary document object that was available in the Legacy DOM implementations. Although the Legacy DOM implementations were largely compatible since JScript was based on JavaScript, the DHTML DOM extensions were developed in parallel by each browser maker and remained incompatible. These versions of the DOM became known as the "Intermediate DOM".
After the standardization of ECMAScript, the W3C DOM Working Group began drafting a standard DOM specification. The completed specification, known as "DOM Level 1", became a W3C Recommendation in late 1998. By 2005, large parts of W3C DOM were well-supported by common ECMAScript-enabled browsers, including Internet Explorer 6 (from 2001), Opera, Safari and Gecko-based browsers (like Mozilla, Firefox, SeaMonkey and Camino).
== Standards ==
The W3C DOM Working Group published its final recommendation and subsequently disbanded in 2004. Development efforts migrated to the WHATWG, which continues to maintain a living standard. In 2009, the Web Applications group reorganized DOM activities at the W3C. In 2013, due to a lack of progress and the impending release of HTML5, the DOM Level 4 specification was reassigned to the HTML Working Group to expedite its completion. Meanwhile, in 2015, the Web Applications group was disbanded and DOM stewardship passed to the Web Platform group. Beginning with the publication of DOM Level 4 in 2015, the W3C creates new recommendations based on snapshots of the WHATWG standard.
DOM Level 1 provided a complete model for an entire HTML or XML document, including the means to change any portion of the document.
DOM Level 2 was published in late 2000. It introduced the getElementById function as well as an event model and support for XML namespaces and CSS.
DOM Level 3, published in April 2004, added support for XPath and keyboard event handling, as well as an interface for serializing documents as XML.
HTML5 was published in October 2014. Part of HTML5 had replaced DOM Level 2 HTML module.
DOM Level 4 was published in 2015 and retired in November 2020.
DOM 2020-06 was published in September 2021 as a W3C Recommendation. It is a snapshot of the WHATWG living standard.
== Applications ==
=== Web browsers ===
To render a document such as a HTML page, most web browsers use an internal model similar to the DOM. The nodes of every document are organized in a tree structure, called the DOM tree, with the topmost node named as "Document object". When an HTML page is rendered in browsers, the browser downloads the HTML into local memory and automatically parses it to display the page on screen. However, the DOM does not necessarily need to be represented as a tree, and some browsers have used other internal models.
=== JavaScript ===
When a web page is loaded, the browser creates a Document Object Model of the page, which is an object oriented representation of an HTML document that acts as an interface between JavaScript and the document itself. This allows the creation of dynamic web pages, because within a page JavaScript can:
add, change, and remove any of the HTML elements and attributes
change any of the CSS styles
react to all the existing events
create new events
== DOM tree structure ==
A Document Object Model (DOM) tree is a hierarchical representation of an HTML or XML document. It consists of a root node, which is the document itself, and a series of child nodes that represent the elements, attributes, and text content of the document. Each node in the tree has a parent node, except for the root node, and can have multiple child nodes.
=== Elements as nodes ===
Elements in an HTML or XML document are represented as nodes in the DOM tree. Each element node has a tag name and attributes, and can contain other element nodes or text nodes as children. For example, an HTML document with the following structure:will be represented in the DOM tree as:
=== Text nodes ===
Text content within an element is represented as a text node in the DOM tree. Text nodes do not have attributes or child nodes, and are always leaf nodes in the tree. For example, the text content "My Website" in the title element and "Welcome" in the h1 element in the above example are both represented as text nodes.
=== Attributes as properties ===
Attributes of an element are represented as properties of the element node in the DOM tree. For example, an element with the following HTML:will be represented in the DOM tree as:
== Manipulating the DOM tree ==
The DOM tree can be manipulated using JavaScript or other programming languages. Common tasks include navigating the tree, adding, removing, and modifying nodes, and getting and setting the properties of nodes. The DOM API provides a set of methods and properties to perform these operations, such as getElementById, createElement, appendChild, and innerHTML.Another way to create a DOM structure is using the innerHTML property to insert HTML code as a string, creating the elements and children in the process. For example:Another method is to use a JavaScript library or framework such as jQuery, AngularJS, React, Vue.js, etc. These libraries provide a more convenient, eloquent and efficient way to create, manipulate and interact with the DOM.
It is also possible to create a DOM structure from an XML or JSON data, using JavaScript methods to parse the data and create the nodes accordingly.
Creating a DOM structure does not necessarily mean that it will be displayed in the web page, it only exists in memory and should be appended to the document body or a specific container to be rendered.
In summary, creating a DOM structure involves creating individual nodes and organizing them in a hierarchical structure using JavaScript or other programming languages, and it can be done using several methods depending on the use case and the developer's preference.
== Implementations ==
Because the DOM supports navigation in any direction (e.g., parent and previous sibling) and allows for arbitrary modifications, implementations typically buffer the document. However, a DOM need not originate in a serialized document at all, but can be created in place with the DOM API. And even before the idea of the DOM originated, there were implementations of equivalent structure with persistent disk representation and rapid access, for example DynaText's model disclosed in and various database approaches.
=== Layout engines ===
Web browsers rely on layout engines to parse HTML into a DOM. Some layout engines, such as Trident/MSHTML, are associated primarily or exclusively with a particular browser, such as Internet Explorer. Others, including Blink, WebKit, and Gecko, are shared by a number of browsers, such as Google Chrome, Opera, Safari, and Firefox. The different layout engines implement the DOM standards to varying degrees of compliance.
=== Libraries ===
DOM implementations:
libxml2
MSXML
Xerces is a collection of DOM implementations written in C++, Java and Perl
xml.dom for Python
XML for <SCRIPT> is a JavaScript-based DOM implementation
PHP.Gt DOM is a server-side DOM implementation based on libxml2 and brings DOM level 4 compatibility to the PHP programming language
Domino is a Server-side (Node.js) DOM implementation based on Mozilla's dom.js. Domino is used in the MediaWiki stack with Visual Editor.
SimpleHtmlDom is a simple HTML document object model in C#, which can generate HTML string programmatically.
APIs that expose DOM implementations:
JAXP (Java API for XML Processing) is an API for accessing DOM providers
Lazarus (Free Pascal IDE) contains two variants of the DOM - with UTF-8 and ANSI format
Inspection tools:
DOM Inspector is a web developer tool
== See also ==
Shadow DOM
Virtual DOM
== References ==
=== General references ===
Flanagan, David (2006). JavaScript: The Definitive Guide. O'Reilly & Associates. pp. 312–313. ISBN 0-596-10199-6.
Koch, Peter-Paul (May 14, 2001). "The Document Object Model: an Introduction". Digital Web Magazine. Archived from the original on April 27, 2017. Retrieved January 10, 2009.
Le Hégaret, Philippe (2002). "The W3C Document Object Model (DOM)". World Wide Web Consortium. Retrieved January 10, 2009.
Guisset, Fabian. "What does each DOM Level bring?". Mozilla Developer Center. Mozilla Project. Archived from the original on March 2, 2013. Retrieved January 10, 2009.
== External links ==
DOM Living Standard by the WHATWG
Original W3C DOM hub by the W3C DOM Working Group (outdated)
Latest snapshots of the WHATWG living standard published by the W3C HTML Working Group
Web Platform Working Group (current steward of W3C DOM) | Wikipedia/Document_Object_Model |
Ruby is a general-purpose programming language. It was designed with an emphasis on programming productivity and simplicity. In Ruby, everything is an object, including primitive data types. It was developed in the mid-1990s by Yukihiro "Matz" Matsumoto in Japan.
Ruby is interpreted, high-level, and dynamically typed; its interpreter uses garbage collection and just-in-time compilation. It supports multiple programming paradigms, including procedural, object-oriented, and functional programming. According to the creator, Ruby was influenced by Perl, Smalltalk, Eiffel, Ada, BASIC, and Lisp.
== History ==
=== Early concept ===
According to Matsumoto, Ruby was conceived in 1993. In a 1999 post to the Ruby-Talk mailing list, he shared some of his early ideas about the language:
I was talking with my colleague about the possibility of an object-oriented scripting language. I knew Perl (Perl4, not Perl5), but I didn't like it really, because it had the smell of a toy language (it still has). The object-oriented language seemed very promising. I knew Python then. But I didn't like it, because I didn't think it was a true object-oriented language – OO features appeared to be add-on to the language. As a language maniac and OO fan for 15 years, I really wanted a genuine object-oriented, easy-to-use scripting language. I looked for but couldn't find one. So I decided to make it.
Matsumoto described Ruby's design as resembling a simple Lisp language at its core, with an object system like that of Smalltalk, blocks inspired by higher-order functions, and practical utility like that of Perl.
The name "Ruby" originated during an online chat session between Matsumoto and Keiju Ishitsuka on 24 February 1993, before any code had been written. Two names were initially proposed: "Coral" and "Ruby". Matsumoto chose the latter in a subsequent email to Ishitsuka. He also noted that one factor influencing the choice of the name was that a colleague's birthstone was ruby.
=== Early releases ===
The first public release of Ruby 0.95 was announced on Japanese domestic newsgroups on 21 December 1995. Subsequently, three more versions of Ruby were released in two days. The release coincided with the launch of the Japanese-language ruby-list mailing list, which was the first mailing list for the new language.
Already present at this stage of development were many of the features familiar in later releases of Ruby, including object-oriented design, classes with inheritance, mixins, iterators, closures, exception handling and garbage collection.
After the release of Ruby 0.95 in 1995, several stable versions of Ruby were released in these years.
In 1997, the first article about Ruby was published on the Web. In the same year, Matsumoto was hired by netlab.jp to work on Ruby as a full-time developer.
In 1998, the Ruby Application Archive was launched by Matsumoto, along with a simple English-language homepage for Ruby.
In 1999, the first English language mailing list ruby-talk began, which signaled a growing interest in the language outside Japan. In this same year, Matsumoto and Keiju Ishitsuka wrote the first book on Ruby, The Object-oriented Scripting Language Ruby (オブジェクト指向スクリプト言語 Ruby), which was published in Japan in October 1999. It would be followed in the early 2000s by around 20 books on Ruby published in Japanese.
By 2000, Ruby was more popular than Python in Japan. In September 2000, the first English language book Programming Ruby was printed, which was later freely released to the public, further widening the adoption of Ruby amongst English speakers. In early 2002, the English-language ruby-talk mailing list was receiving more messages than the Japanese-language ruby-list, demonstrating Ruby's increasing popularity in the non-Japanese speaking world.
=== Ruby 1.8 and 1.9 ===
Ruby 1.8 was initially released August 2003, was stable for a long time, and was retired June 2013. Although deprecated, there is still code based on it. Ruby 1.8 is only partially compatible with Ruby 1.9.
Ruby 1.8 has been the subject of several industry standards. The language specifications for Ruby were developed by the Open Standards Promotion Center of the Information-Technology Promotion Agency (a Japanese government agency) for submission to the Japanese Industrial Standards Committee (JISC) and then to the International Organization for Standardization (ISO). It was accepted as a Japanese Industrial Standard (JIS X 3017) in 2011 and an international standard (ISO/IEC 30170) in 2012.
Around 2005, interest in the Ruby language surged in tandem with Ruby on Rails, a web framework written in Ruby. Rails is frequently credited with increasing awareness of Ruby.
Effective with Ruby 1.9.3, released 31 October 2011, Ruby switched from being dual-licensed under the Ruby License and the GPL to being dual-licensed under the Ruby License and the two-clause BSD license. Adoption of 1.9 was slowed by changes from 1.8 that required many popular third party gems to be rewritten.
=== Ruby 2 ===
Ruby 2.0 was intended to be fully backward compatible with Ruby 1.9.3. As of the official 2.0.0 release on 24 February 2013, there were only five known incompatibilities.
Starting with 2.1.0, Ruby's versioning policy changed to be more similar to semantic versioning, although it differs slightly in that minor version increments may be API incompatible.
Ruby 2.2.0 includes speed-ups, bugfixes, and library updates and removes some deprecated APIs. Most notably, Ruby 2.2.0 introduces changes to memory handling – an incremental garbage collector, support for garbage collection of symbols and the option to compile directly against jemalloc. It also contains experimental support for using vfork(2) with system() and spawn(), and added support for the Unicode 7.0 specification. Since version 2.2.1, Ruby MRI performance on PowerPC64 was improved. Features that were made obsolete or removed include callcc, the DL library, Digest::HMAC, lib/rational.rb, lib/complex.rb, GServer, Logger::Application as well as various C API functions.
Ruby 2.3.0 includes many performance improvements, updates, and bugfixes including changes to Proc#call, Socket and IO use of exception keywords, Thread#name handling, default passive Net::FTP connections, and Rake being removed from stdlib. Other notable changes include:
The ability to mark all string literals as frozen by default with a consequently large performance increase in string operations.
Hash comparison to allow direct checking of key/value pairs instead of just keys.
A new safe navigation operator &. that can ease nil handling (e.g. instead of if obj && obj.foo && obj.foo.bar, we can use if obj&.foo&.bar).
The did_you_mean gem is now bundled by default and required on startup to automatically suggest similar name matches on a NameError or NoMethodError.
Hash#dig and Array#dig to easily extract deeply nested values (e.g. given profile = { social: { wikipedia: { name: 'Foo Baz' } } }, the value Foo Baz can now be retrieved by profile.dig(:social, :wikipedia, :name)).
.grep_v(regexp) which will match all negative examples of a given regular expression in addition to other new features.
Ruby 2.4.0 includes performance improvements to hash table, Array#max, Array#min, and instance variable access. Other notable changes include:
Binding#irb: Start a REPL session similar to binding.pry
Unify Fixnum and Bignum into Integer class
String supports Unicode case mappings, not just ASCII
A new method, Regexp#match?, which is a faster Boolean version of Regexp#match
Thread deadlock detection now shows threads with their backtrace and dependency
A few notable changes in Ruby 2.5.0 include rescue and ensure statements automatically use a surrounding do-end block (less need for extra begin-end blocks), method-chaining with yield_self, support for branch coverage and method coverage measurement, and easier Hash transformations with Hash#slice and Hash#transform_keys On top of that come a lot of performance improvements like faster block passing (3 times faster), faster Mutexes, faster ERB templates and improvements on some concatenation methods.
A few notable changes in Ruby 2.6.0 include an experimental just-in-time compiler (JIT), and RubyVM::AbstractSyntaxTree (experimental).
A few notable changes in Ruby 2.7.0 include pattern Matching (experimental), REPL improvements, a compaction GC, and separation of positional and keyword arguments.
=== Ruby 3 ===
Ruby 3.0.0 was released on Christmas Day in 2020. It is known as Ruby 3x3, which signifies that programs would run three times faster in Ruby 3.0 comparing to Ruby 2.0. and some had already implemented in intermediate releases on the road from 2 to 3. To achieve 3x3, Ruby 3 comes with MJIT, and later YJIT, Just-In-Time Compilers, to make programs faster, although they are described as experimental and remain disabled by default (enabled by flags at runtime).
Another goal of Ruby 3.0 is to improve concurrency and two more utilities Fibre Scheduler, and experimental Ractor facilitate the goal. Ractor is light-weight and thread-safe as it is achieved by exchanging messages rather than shared objects.
Ruby 3.0 introduces RBS language to describe the types of Ruby programs for static analysis. It is separated from general Ruby programs.
There are some syntax enhancements and library changes in Ruby 3.0 as well.
Ruby 3.1 was released on 25 December 2021. It includes YJIT, a new, experimental, Just-In-Time Compiler developed by Shopify, to enhance the performance of real world business applications. A new debugger is also included. There are some syntax enhancements and other improvements in this release. Network libraries for FTP, SMTP, IMAP, and POP are moved from default gems to bundled gems.
Ruby 3.2 was released on 25 December 2022. It brings support for being run inside of a WebAssembly environment via a WASI interface. Regular expressions also receives some improvements, including a faster, memoized matching algorithm to protect against certain ReDoS attacks, and configurable timeouts for regular expression matching. Additional debugging and syntax features are also included in this release, which include syntax suggestion, as well as error highlighting. The MJIT compiler has been re-implemented as a standard library module, while the YJIT, a Rust-based JIT compiler now supports more architectures on Linux.
Ruby 3.3 was released on 25 December 2023. Ruby 3.3 introduces significant enhancements and performance improvements to the language. Key features include the introduction of the Prism parser for portable and maintainable parsing, the addition of the pure-Ruby JIT compiler RJIT, and major performance boosts in the YJIT compiler. Additionally, improvements in memory usage, the introduction of an M:N thread scheduler, and updates to the standard library contribute to a more efficient and developer-friendly Ruby ecosystem.
Ruby 3.4 was released on 25 December 2024. Ruby 3.4 adds it block parameter reference, changes Prism as default parser, adds Happy Eyeballs Version 2 support to socket library, improves YJIT, adds modular Garbage Collector and so on.
== Semantics and philosophy ==
Matsumoto has said that Ruby is designed for programmer productivity and fun, following the principles of good user interface design. At a Google Tech Talk in 2008 he said, "I hope to see Ruby help every programmer in the world to be productive, and to enjoy programming, and to be happy. That is the primary purpose of Ruby language." He stresses that systems design needs to emphasize human, rather than computer, needs:
Often people, especially computer engineers, focus on the machines. They think, "By doing this, the machine will run fast. By doing this, the machine will run more effectively. By doing this, the machine will something something something." They are focusing on machines. But in fact we need to focus on humans, on how humans care about doing programming or operating the application of the machines. We are the masters. They are the slaves.
Matsumoto has said his primary design goal was to make a language that he himself enjoyed using, by minimizing programmer work and possible confusion. He has said that he had not applied the principle of least astonishment (POLA) to the design of Ruby; in a May 2005 discussion on the newsgroup comp.lang.ruby, Matsumoto attempted to distance Ruby from POLA, explaining that because any design choice will be surprising to someone, he uses a personal standard in evaluating surprise. If that personal standard remains consistent, there would be few surprises for those familiar with the standard.
Matsumoto defined it this way in an interview:
Everyone has an individual background. Someone may come from Python, someone else may come from Perl, and they may be surprised by different aspects of the language. Then they come up to me and say, 'I was surprised by this feature of the language, so Ruby violates the principle of least surprise.' Wait. Wait. The principle of least surprise is not for you only. The principle of least surprise means principle of least my surprise. And it means the principle of least surprise after you learn Ruby very well. For example, I was a C++ programmer before I started designing Ruby. I programmed in C++ exclusively for two or three years. And after two years of C++ programming, it still surprises me.
Ruby is object-oriented: every value is an object, including classes and instances of types that many other languages designate as primitives (such as integers, Booleans, and "null"). Because everything in Ruby is an object, everything in Ruby has certain built-in abilities called methods. Every function is a method and methods are always called on an object. Methods defined at the top level scope become methods of the Object class. Since this class is an ancestor of every other class, such methods can be called on any object. They are also visible in all scopes, effectively serving as "global" procedures. Ruby supports inheritance with dynamic dispatch, mixins and singleton methods (belonging to, and defined for, a single instance rather than being defined on the class). Though Ruby does not support multiple inheritance, classes can import modules as mixins.
Ruby has been described as a multi-paradigm programming language: it allows procedural programming (defining functions/variables outside classes makes them part of the root, 'self' Object), with object orientation (everything is an object) or functional programming (it has anonymous functions, closures, and continuations; statements all have values, and functions return the last evaluation). It has support for introspection, reflective programming, metaprogramming, and interpreter-based threads. Ruby features dynamic typing, and supports parametric polymorphism.
According to the Ruby FAQ, the syntax is similar to Perl's and the semantics are similar to Smalltalk's, but the design philosophy differs greatly from Python's.
== Features ==
Thoroughly object-oriented with inheritance, mixins and metaclasses
Dynamic typing and duck typing
Everything is an expression (even statements) and everything is executed imperatively (even declarations)
Succinct and flexible syntax that minimizes syntactic noise and serves as a foundation for domain-specific languages
Dynamic reflection and alteration of objects to facilitate metaprogramming
Lexical closures, iterators and generators, with a block syntax
Literal notation for arrays, hashes, regular expressions and symbols
Embedding code in strings (interpolation)
Default arguments
Four levels of variable scope (global, class, instance, and local) denoted by sigils or the lack thereof
Garbage collection
First-class continuations
Strict Boolean coercion rules (everything is true except false and nil)
Exception handling
Operator overloading
Built-in support for rational numbers, complex numbers and arbitrary-precision arithmetic
Custom dispatch behavior (through method_missing and const_missing)
Native threads and cooperative fibers (fibers are a 1.9/YARV feature)
Support for Unicode and multiple character encodings.
Native plug-in API in C
Interactive Ruby Shell, an interactive command-line interpreter that can be used to test code quickly (REPL)
Centralized package management through RubyGems
Implemented on all major platforms
Large standard library, including modules for YAML, JSON, XML, CGI, OpenSSL, HTTP, FTP, RSS, curses, zlib and Tk
Just-in-time compilation
== Syntax ==
The syntax of Ruby is broadly similar to that of Perl and Python. Class and method definitions are signaled by keywords, whereas code blocks can be defined by either keywords or braces. In contrast to Perl, variables are not obligatorily prefixed with a sigil. When used, the sigil changes the semantics of scope of the variable. For practical purposes there is no distinction between expressions and statements. Line breaks are significant and taken as the end of a statement; a semicolon may be equivalently used. Unlike Python, indentation is not significant.
One of the differences from Python and Perl is that Ruby keeps all of its instance variables completely private to the class and only exposes them through accessor methods (attr_writer, attr_reader, etc.). Unlike the "getter" and "setter" methods of other languages like C++ or Java, accessor methods in Ruby can be created with a single line of code via metaprogramming; however, accessor methods can also be created in the traditional fashion of C++ and Java. As invocation of these methods does not require the use of parentheses, it is trivial to change an instance variable into a full function, without modifying a single line of calling code or having to do any refactoring achieving similar functionality to C# and VB.NET property members.
Python's property descriptors are similar, but come with a trade-off in the development process. If one begins in Python by using a publicly exposed instance variable, and later changes the implementation to use a private instance variable exposed through a property descriptor, code internal to the class may need to be adjusted to use the private variable rather than the public property. Ruby's design forces all instance variables to be private, but also provides a simple way to declare set and get methods. This is in keeping with the idea that in Ruby, one never directly accesses the internal members of a class from outside the class; rather, one passes a message to the class and receives a response.
== Implementations ==
=== Matz's Ruby interpreter ===
The original Ruby interpreter is often referred to as Matz's Ruby Interpreter or MRI. This implementation is written in C and uses its own Ruby-specific virtual machine.
The standardized and retired Ruby 1.8 implementation was written in C, as a single-pass interpreted language.
Starting with Ruby 1.9, and continuing with Ruby 2.x and above, the official Ruby interpreter has been YARV ("Yet Another Ruby VM"), and this implementation has superseded the slower virtual machine used in previous releases of MRI.
=== Alternative implementations ===
As of 2018, there are a number of alternative implementations of Ruby, including JRuby, Rubinius, and mruby. Each takes a different approach, with JRuby and Rubinius providing just-in-time compilation and mruby also providing ahead-of-time compilation.
Ruby has three major alternative implementations:
JRuby, a mixed Java and Ruby implementation that runs on the Java virtual machine. JRuby currently targets Ruby 3.1.x.
TruffleRuby, a Java implementation using the Truffle language implementation framework with GraalVM
Rubinius, a C++ bytecode virtual machine that uses LLVM to compile to machine code at runtime. The bytecode compiler and most core classes are written in pure Ruby. Rubinius currently targets Ruby 2.3.1.
Other Ruby implementations include:
MagLev, a Smalltalk implementation that runs on GemTalk Systems' GemStone/S VM
mruby, an implementation designed to be embedded into C code, in a similar vein to Lua. It is currently being developed by Yukihiro Matsumoto and others
RGSS, or Ruby Game Scripting System, a proprietary implementation that is used by the RPG Maker series of software for game design and modification of the RPG Maker engine
julializer, a transpiler (partial) from Ruby to Julia. It can be used for a large speedup over e.g. Ruby or JRuby implementations (may only be useful for numerical code).
Topaz, a Ruby implementation written in Python
Opal, a web-based interpreter that compiles Ruby to JavaScript
Other now defunct Ruby implementations were:
MacRuby, a Mac OS X implementation on the Objective-C runtime. Its iOS counterpart is called RubyMotion
IronRuby an implementation on the .NET Framework
Cardinal, an implementation for the Parrot virtual machine
Ruby Enterprise Edition, often shortened to ree, an implementation optimized to handle large-scale Ruby on Rails projects
HotRuby, a JavaScript and ActionScript implementation of the Ruby programming language
The maturity of Ruby implementations tends to be measured by their ability to run the Ruby on Rails (Rails) framework, because it is complex to implement and uses many Ruby-specific features. The point when a particular implementation achieves this goal is called "the Rails singularity". The reference implementation, JRuby, and Rubinius are all able to run Rails unmodified in a production environment.
=== Platform support ===
Matsumoto originally developed Ruby on the 4.3BSD-based Sony NEWS-OS 3.x, but later migrated his work to SunOS 4.x, and finally to Linux. By 1999, Ruby was known to work across many different operating systems. Modern Ruby versions and implementations are available on all major desktop, mobile and server-based operating systems. Ruby is also supported across a number of cloud hosting platforms like Jelastic, Heroku, Google Cloud Platform and others.
Tools such as RVM and RBEnv, facilitate installation and partitioning of multiple ruby versions, and multiple 'gemsets' on one machine.
== Repositories and libraries ==
RubyGems is Ruby's package manager. A Ruby package is called a "gem" and can be installed via the command line. Most gems are libraries, though a few exist that are applications, such as IDEs. There are over 100,000 Ruby gems hosted on RubyGems.org.
Many new and existing Ruby libraries are hosted on GitHub, a service that offers version control repository hosting for Git.
The Ruby Application Archive, which hosted applications, documentation, and libraries for Ruby programming, was maintained until 2013, when its function was transferred to RubyGems.
== See also ==
Comparison of programming languages
Metasploit
Why's (poignant) Guide to Ruby
Crystal (programming language)
Ruby on Rails
== References ==
== Further reading ==
== External links ==
Official website
Ruby documentation | Wikipedia/Eigenclass_model |
The object-modeling technique (OMT) is an object modeling approach for software modeling and designing. It was developed around 1991 by Rumbaugh, Blaha, Premerlani, Eddy and Lorensen as a method to develop object-oriented systems and to support object-oriented programming. OMT describes object model or static structure of the system.
OMT was developed as an approach to software development. The purposes of modeling according to Rumbaugh are:
testing physical entities before building them (simulation),
communication with customers,
visualization (alternative presentation of information), and
reduction of complexity.
OMT has proposed three main types of models:
Object model: The object model represents the static and most stable phenomena in the modeled domain. Main concepts are classes and associations with attributes and operations. Aggregation and generalization (with multiple inheritance) are predefined relationships.
Dynamic model: The dynamic model represents a state/transition view on the model. Main concepts are states, transitions between states, and events to trigger transitions. Actions can be modeled as occurring within states. Generalization and aggregation (concurrency) are predefined relationships.
Functional model: The functional model handles the process perspective of the model, corresponding roughly to data flow diagrams. Main concepts are process, data store, data flow, and actors.
OMT is a predecessor of the Unified Modeling Language (UML). Many OMT modeling elements are common to UML.
Functional Model in OMT:
In brief, a functional model in OMT defines the function of the whole internal processes in a model with the help of "Data Flow Diagrams (DFDs)". It details how processes are performed independently.
== References ==
== Further reading ==
James Rumbaugh, Michael Blaha, William Premerlani, Frederick Eddy, William Lorensen (1994). Object-Oriented Modeling and Design. Prentice Hall. ISBN 0-13-629841-9
Terry Quatrani, Michael Jesse Chonoles (1996). Succeeding With the Booch and OMT Methods: A Practical Approach. Addison Wesley. ISBN 978-0-8053-2279-8
== External links ==
Some of the early history of OMT
A short introduction to OMT
The model is defined by the organization’s vision, mission, and values, as well as sets of boundaries for the organization—what products or services it will deliver, what customers or markets it will target, and what supply and delivery channels it will use. While the business model includes high-level strategies and tactical direction for how the organization will implement the model, it also includes the annual goals that set the specific steps the organization intends to undertake in the next year and the measures for their expected accomplishment. Each of these is likely to be part of internal documentation that is available to the internal auditor. | Wikipedia/Object-modeling_technique |
In computer programming, a generic function is a function defined for polymorphism.
== In statically typed languages ==
In statically typed languages (such as C++ and Java), the term generic functions refers to a mechanism for compile-time polymorphism (static dispatch), specifically parametric polymorphism. These are functions defined with TypeParameters, intended to be resolved with compile time type information. The compiler uses these types to instantiate suitable versions, resolving any function overloading appropriately.
== In Common Lisp Object System ==
In some systems for object-oriented programming such as the Common Lisp Object System (CLOS) and Dylan, a generic function is an entity made up of all methods having the same name. Typically a generic function is an instance of a class that inherits both from function and standard-object. Thus generic functions are both functions (that can be called with and applied to arguments) and ordinary objects. The book The Art of the Metaobject Protocol explains the implementation and use of CLOS generic functions in detail.
One of the early object-oriented programming extensions to Lisp is Flavors. It used the usual message sending paradigm influenced by Smalltalk. The Flavors syntax to send a message is:
With New Flavors, it was decided the message should be a real function and the usual function calling syntax should be used:
message now is a generic function, an object and function in its own right. Individual implementations of the message are called methods.
The same idea was implemented in CommonLoops. New Flavors and CommonLoops were the main influence for the Common Lisp Object System.
== Example ==
=== Common Lisp ===
Define a generic function with two parameters object-1 and object-2. The name of the generic function is collide.
Methods belonging to the generic function are defined outside of classes.
Here we define a method for the generic function collide which is specialized for the classes asteroid (first parameter object-1) and spaceship (second parameter object-2). The parameters are used as normal variables inside the method body. There is no special namespace that has access to class slots.
Calling the generic function:
Common Lisp can also retrieve individual methods from the generic function. FIND-METHOD finds the method from the generic function collide specialized for the classes asteroid and spaceship.
=== Comparison to other languages ===
Generic functions correspond roughly to what Smalltalk terms methods, with the notable exception that, in Smalltalk, the receiver's class is the sole determinant of which body of code is called: the types or values of the arguments are irrelevant (single dispatch). In a programming language with multiple dispatch when a generic function is called, method dispatch occurs on the basis of all arguments, not just one which is privileged. New Flavors also provided generic functions, but only single dispatch.
In JavaScript, a generic function is a function that can work with values of different types, rather than a specific type. This is achieved through the use of type parameters or by dynamically checking the type of the value being operated on. One common use case for generic functions in JavaScript is to create reusable functions that can work with different data types, such as arrays, strings, or objects. JavaScript's dynamic typing system makes it particularly suited for the creation of generic functions, as values can be easily coerced or converted to different types as needed.
== References == | Wikipedia/Generic_function |
A database model is a type of data model that determines the logical structure of a database. It fundamentally determines in which manner data can be stored, organized and manipulated. The most popular example of a database model is the relational model, which uses a table-based format.
== Types ==
Common logical data models for databases include:
Hierarchical database model
This is the oldest form of database model. It was developed by IBM for IMS (information Management System), and is a set of organized data in tree structure. DB record is a tree consisting of many groups called segments. It uses one-to-many relationships, and the data access is also predictable.
Network model
Relational model
Entity–relationship model
Enhanced entity–relationship model
Object model
Document model
Entity–attribute–value model
Star schema
An object–relational database combines the two related structures.
Physical data models include:
Inverted index
Flat file
Other models include:
Multidimensional model
Multivalue model
Semantic model
XML database
Named graph
Triplestore
== Relationships and functions ==
A given database management system may provide one or more models. The optimal structure depends on the natural organization of the application's data, and on the application's requirements, which include transaction rate (speed), reliability, maintainability, scalability, and cost. Most database management systems are built around one particular data model, although it is possible for products to offer support for more than one model.
Various physical data models can implement any given logical model. Most database software will offer the user some level of control in tuning the physical implementation, since the choices that are made have a significant effect on performance.
A model is not just a way of structuring data: it also defines a set of operations that can be performed on the data. The relational model, for example, defines operations such as select, project and join. Although these operations may not be explicit in a particular query language, they provide the foundation on which a query language is built.
== Flat model ==
The flat (or table) model consists of a single, two-dimensional array of data elements, where all members of a given column are assumed to be similar values, and all members of a row are assumed to be related to one another. For instance, columns for name and password that might be used as a part of a system security database. Each row would have the specific password associated with an individual user. Columns of the table often have a type associated with them, defining them as character data, date or time information, integers, or floating point numbers. This tabular format is a precursor to the relational model.
== Early data models ==
These models were popular in the 1960s, 1970s, but nowadays can be found primarily in old legacy systems. They are characterized primarily by being navigational with strong connections between their logical and physical representations, and deficiencies in data independence.
=== Hierarchical model ===
In a hierarchical model, data is organized into a tree-like structure, implying a single parent for each record. A sort field keeps sibling records in a particular order. Hierarchical structures were widely used in the early mainframe database management systems, such as the Information Management System (IMS) by IBM, and now describe the structure of XML documents. This structure allows one-to-many relationship between two types of data. This structure is very efficient to describe many relationships in the real world; recipes, table of contents, ordering of paragraphs/verses, any nested and sorted information.
This hierarchy is used as the physical order of records in storage. Record access is done by navigating downward through the data structure using pointers combined with sequential accessing. Because of this, the hierarchical structure is inefficient for certain database operations when a full path (as opposed to upward link and sort field) is not also included for each record. Such limitations have been compensated for in later IMS versions by additional logical hierarchies imposed on the base physical hierarchy.
=== Network model ===
The network model expands upon the hierarchical structure, allowing many-to-many relationships in a tree-like structure that allows multiple parents. It was most popular before being replaced by the relational model, and is defined by the CODASYL specification.
The network model organizes data using two fundamental concepts, called records and sets. Records contain fields (which may be organized hierarchically, as in the programming language COBOL). Sets (not to be confused with mathematical sets) define one-to-many relationships between records: one owner, many members. A record may be an owner in any number of sets, and a member in any number of sets.
A set consists of circular linked lists where one record type, the set owner or parent, appears once in each circle, and a second record type, the subordinate or child, may appear multiple times in each circle. In this way a hierarchy may be established between any two record types, e.g., type A is the owner of B. At the same time another set may be defined where B is the owner of A. Thus all the sets comprise a general directed graph (ownership defines a direction), or network construct. Access to records is either sequential (usually in each record type) or by navigation in the circular linked lists.
The network model is able to represent redundancy in data more efficiently than in the hierarchical model, and there can be more than one path from an ancestor node to a descendant. The operations of the network model are navigational in style: a program maintains a current position, and navigates from one record to another by following the relationships in which the record participates. Records can also be located by supplying key values.
Although it is not an essential feature of the model, network databases generally implement the set relationships by means of pointers that directly address the location of a record on disk. This gives excellent retrieval performance, at the expense of operations such as database loading and reorganization.
Popular DBMS products that utilized it were Cincom Systems' Total and Cullinet's IDMS. IDMS gained a considerable customer base; in the 1980s, it adopted the relational model and SQL in addition to its original tools and languages.
Most object databases (invented in the 1990s) use the navigational concept to provide fast navigation across networks of objects, generally using object identifiers as "smart" pointers to related objects. Objectivity/DB, for instance, implements named one-to-one, one-to-many, many-to-one, and many-to-many named relationships that can cross databases. Many object databases also support SQL, combining the strengths of both models.
=== Inverted file model ===
In an inverted file or inverted index, the contents of the data are used as keys in a lookup table, and the values in the table are pointers to the location of each instance of a given content item. This is also the logical structure of contemporary database indexes, which might only use the contents from a particular columns in the lookup table. The inverted file data model can put indexes in a set of files next to existing flat database files, in order to efficiently directly access needed records in these files.
Notable for using this data model is the ADABAS DBMS of Software AG, introduced in 1970. ADABAS has gained considerable customer base and exists and supported until today. In the 1980s it has adopted the relational model and SQL in addition to its original tools and languages.
Document-oriented database Clusterpoint uses inverted indexing model to provide fast full-text search for XML or JSON data objects for example.
== Relational model ==
The relational model was introduced by E.F. Codd in 1970 as a way to make database management systems more independent of any particular application. It is a mathematical model defined in terms of predicate logic and set theory, and implementations of it have been used by mainframe, midrange and microcomputer systems.
The products that are generally referred to as relational databases in fact implement a model that is only an approximation to the mathematical model defined by Codd. Three key terms are used extensively in relational database models: relations, attributes, and domains. A relation is a table with columns and rows. The named columns of the relation are called attributes, and the domain is the set of values the attributes are allowed to take.
The basic data structure of the relational model is the table, where information about a particular entity (say, an employee) is represented in rows (also called tuples) and columns. Thus, the "relation" in "relational database" refers to the various tables in the database; a relation is a set of tuples. The columns enumerate the various attributes of the entity (the employee's name, address or phone number, for example), and a row is an actual instance of the entity (a specific employee) that is represented by the relation. As a result, each tuple of the employee table represents various attributes of a single employee.
All relations (and, thus, tables) in a relational database have to adhere to some basic rules to qualify as relations. First, the ordering of columns is immaterial in a table. Second, there can not be identical tuples or rows in a table. And third, each tuple will contain a single value for each of its attributes.
A relational database contains multiple tables, each similar to the one in the "flat" database model. One of the strengths of the relational model is that, in principle, any value occurring in two different records (belonging to the same table or to different tables), implies a relationship among those two records. Yet, in order to enforce explicit integrity constraints, relationships between records in tables can also be defined explicitly, by identifying or non-identifying parent-child relationships characterized by assigning cardinality (1:1, (0)1:M, M:M). Tables can also have a designated single attribute or a set of attributes that can act as a "key", which can be used to uniquely identify each tuple in the table.
A key that can be used to uniquely identify a row in a table is called a primary key. Keys are commonly used to join or combine data from two or more tables. For example, an Employee table may contain a column named Location which contains a value that matches the key of a Location table. Keys are also critical in the creation of indexes, which facilitate fast retrieval of data from large tables. Any column can be a key, or multiple columns can be grouped together into a compound key. It is not necessary to define all the keys in advance; a column can be used as a key even if it was not originally intended to be one.
A key that has an external, real-world meaning (such as a person's name, a book's ISBN, or a car's serial number) is sometimes called a "natural" key. If no natural key is suitable (think of the many people named Brown), an arbitrary or surrogate key can be assigned (such as by giving employees ID numbers). In practice, most databases have both generated and natural keys, because generated keys can be used internally to create links between rows that cannot break, while natural keys can be used, less reliably, for searches and for integration with other databases. (For example, records in two independently developed databases could be matched up by social security number, except when the social security numbers are incorrect, missing, or have changed.)
The most common query language used with the relational model is the Structured Query Language (SQL).
=== Dimensional model ===
The dimensional model is a specialized adaptation of the relational model used to represent data in data warehouses in a way that data can be easily summarized using online analytical processing, or OLAP queries. In the dimensional model, a database schema consists of a single large table of facts that are described using dimensions and measures. A dimension provides the context of a fact (such as who participated, when and where it happened, and its type) and is used in queries to group related facts together. Dimensions tend to be discrete and are often hierarchical; for example, the location might include the building, state, and country. A measure is a quantity describing the fact, such as revenue. It is important that measures can be meaningfully aggregated—for example, the revenue from different locations can be added together.
In an OLAP query, dimensions are chosen and the facts are grouped and aggregated together to create a summary.
The dimensional model is often implemented on top of the relational model using a star schema, consisting of one highly normalized table containing the facts, and surrounding denormalized tables containing each dimension. An alternative physical implementation, called a snowflake schema, normalizes multi-level hierarchies within a dimension into multiple tables.
A data warehouse can contain multiple dimensional schemas that share dimension tables, allowing them to be used together. Coming up with a standard set of dimensions is an important part of dimensional modeling.
Its high performance has made the dimensional model the most popular database structure for OLAP.
== Post-relational database models ==
Products offering a more general data model than the relational model are sometimes classified as post-relational. Alternate terms include "hybrid database", "Object-enhanced RDBMS" and others. The data model in such products incorporates relations but is not constrained by E.F. Codd's Information Principle, which requires that
all information in the database must be cast explicitly in terms of values in relations and in no other way
Some of these extensions to the relational model integrate concepts from technologies that pre-date the relational model. For example, they allow representation of a directed graph with trees on the nodes. The German company sones implements this concept in its GraphDB.
Some post-relational products extend relational systems with non-relational features. Others arrived in much the same place by adding relational features to pre-relational systems. Paradoxically, this allows products that are historically pre-relational, such as PICK and MUMPS, to make a plausible claim to be post-relational.
The resource space model (RSM) is a non-relational data model based on multi-dimensional classification.
=== Graph model ===
Graph databases allow even more general structure than a network database; any node may be connected to any other node.
=== Multivalue model ===
Multivalue databases are "lumpy" data, in that they can store exactly the same way as relational databases, but they also permit a level of depth which the relational model can only approximate using sub-tables. This is nearly identical to the way XML expresses data, where a given field/attribute can have multiple right answers at the same time. Multivalue can be thought of as a compressed form of XML.
An example is an invoice, which in either multivalue or relational data could be seen as (A) Invoice Header Table - one entry per invoice, and (B) Invoice Detail Table - one entry per line item. In the multivalue model, we have the option of storing the data as on table, with an embedded table to represent the detail: (A) Invoice Table - one entry per invoice, no other tables needed.
The advantage is that the atomicity of the Invoice (conceptual) and the Invoice (data representation) are one-to-one. This also results in fewer reads, less referential integrity issues, and a dramatic decrease in the hardware needed to support a given transaction volume.
=== Object-oriented database models ===
In the 1990s, the object-oriented programming paradigm was applied to database technology, creating a new database model known as object databases. This aims to avoid the object–relational impedance mismatch – the overhead of converting information between its representation in the database (for example as rows in tables) and its representation in the application program (typically as objects). Even further, the type system used in a particular application can be defined directly in the database, allowing the database to enforce the same data integrity invariants. Object databases also introduce the key ideas of object programming, such as encapsulation and polymorphism, into the world of databases.
A variety of these ways have been tried for storing objects in a database. Some products have approached the problem from the application programming end, by making the objects manipulated by the program persistent. This typically requires the addition of some kind of query language, since conventional programming languages do not have the ability to find objects based on their information content. Others have attacked the problem from the database end, by defining an object-oriented data model for the database, and defining a database programming language that allows full programming capabilities as well as traditional query facilities.
Object databases suffered because of a lack of standardization: although standards were defined by ODMG, they were never implemented well enough to ensure interoperability between products. Nevertheless, object databases have been used successfully in many applications: usually specialized applications such as engineering databases or molecular biology databases rather than mainstream commercial data processing. However, object database ideas were picked up by the relational vendors and influenced extensions made to these products and indeed to the SQL language.
An alternative to translating between objects and relational databases is to use an object–relational mapping (ORM) library.
== See also ==
Database design
== References == | Wikipedia/Document_modelling |
Entity Framework (EF) is an open source object–relational mapping (ORM) framework for ADO.NET. It was originally shipped as an integral part of .NET Framework, however starting with Entity Framework version 6.0 it has been delivered separately from the .NET Framework.
Entity Framework 6.4 was the latest release of the classic framework. Although Entity Framework 6 is still supported, it is no longer being developed and will only receive fixes for security issues.
A new framework known as Entity Framework Core (EF Core) was introduced in 2016 with similar but not complete feature parity. Version numbering of this framework restarted from 1.0 and the latest version of EF Core is 9.0.4.
== Overview ==
The Entity Framework is a set of technologies in ADO.NET that supports the development of data-oriented software applications. Architects and developers of data-oriented applications have typically struggled with the need to achieve two very different objectives. They must model the entities, relationships, and logic of the business problems they are solving, and they must also work with the data engines used to store and retrieve the data. The data can span multiple storage systems, each with its own protocols; even applications that work with a single storage system must balance the requirements of the storage system against the requirements of writing efficient and maintainable application code. This problem is generally referred to as the "object–relational impedance mismatch".
Many object–relational mapping (ORM) tools (aka "object–relational managers") have been developed to enable developers to work with data in the form of domain-specific objects and properties, such as customers and customer addresses, without having to concern themselves with the underlying database tables and columns where this data is stored. With an ORM, developers can work at a higher level of abstraction when they deal with data, and can create and maintain data-oriented applications with less code than in traditional applications. Entity Framework is the ORM solution currently promoted for use within the Microsoft development stack.
== History ==
The first version of Entity Framework (EFv1) was included with .NET Framework 3.5 Service Pack 1 and Visual Studio 2008 Service Pack 1, released on 11 August 2008 (2008-08-11). This version was widely criticized, even attracting a 'vote of no confidence' signed by at least one thousand developers.
The second version of Entity Framework, named Entity Framework 4.0 (EFv4), was released as part of .NET 4.0 on 12 April 2010 and addressed many of the criticisms made of version 1.
A third version of Entity Framework, version 4.1, was released on April 12, 2011, with Code First support.
A refresh of version 4.1, named Entity Framework 4.1 Update 1, was released on July 25, 2011. It includes bug fixes and new supported types.
The version 4.3.1 was released on February 29, 2012. There were a few updates, like support for migration.
Version 5.0.0 was released on August 11, 2012 and is targeted at .NET framework 4.5.
Also, this version is available for .Net framework 4, but without any runtime advantages over version 4.
Version 6.0 was released on October 17, 2013 and is now an open source project licensed under Apache License v2. Like ASP.NET MVC, its source code is hosted at GitHub using Git. This version has a number of improvements for code-first support.
Microsoft then decided to modernize, componentize and bring .NET cross-platform to Linux, OSX and elsewhere, meaning the next version of Entity Framework would be a complete rewrite. On 27 June 2016 this was released as Entity Framework Core 1.0, alongside ASP.NET Core 1.0 and .NET Core 1.0. It was originally named Entity Framework 7, but was renamed to highlight that it was a complete rewrite rather than an incremental upgrade and it doesn't replace EF6.
Entity Framework Core 1.0 is licensed under Apache License v2, and was built entirely in the open on GitHub. While Entity Framework Core 1.0 shares some conceptual similarities with prior versions of Entity Framework, it was a completely new codebase designed to be more efficient, powerful, flexible, and extensible, running on Windows, Linux and OSX, and supporting a new range of relational and NoSQL data stores.
Entity Framework Core 2.0 was released on 14 August 2017 (2017-08-14) along with Visual Studio 2017 15.3 and ASP.NET Core 2.0
Entity Framework Core 3.0 was released on 23 September 2019 (2019-09-23) along with Visual Studio 2019 16.3 and ASP.NET Core 3.0,
Entity Framework Core 3.1 (EF Core 3.1) was formally released for production use on 3 December 2019 (2019-12-03) and will be the preferred long-term supported version until at least 3 December 2022.
Entity Framework Core 5.0 (EF Core 5) was released for production use on 9 November 2020 (2020-11-09). It was retired and out of support 1.5 years later on May 10, 2022.
Entity Framework Core 6.0 (EF Core 6) was released on 10 November 2021 (2021-11-10) and will be the preferred long-term supported version until at least 12 November 2024.
Entity Framework Core 7.0 (EF Core 7) was released on 8 November 2022 (2022-11-08) adding features such as JSON columns and bulk updates.
Entity Framework Core 8.0 (EF Core 8) was released on 14 November 2023 (2023-11-14) adding features such as Value objects using Complex Types and Primitive collections.
== Architecture ==
The architecture of the ADO.NET Entity Framework, from the bottom up, consists of the following:
Data source specific providers, which abstract the ADO.NET interfaces to connect to the database when programming against the conceptual schema.
Map provider, a database-specific provider that translates the Entity SQL command tree into a query in the native SQL flavor of the database. It includes the Store-specific bridge, which is the component responsible for translating the generic command tree into a store-specific command tree.
EDM parser and view mapping, which takes the SDL specification of the data model and how it maps onto the underlying relational model and enables programming against the conceptual model. From the relational schema, it creates views of the data corresponding to the conceptual model. It aggregates information from multiple tables in order to aggregate them into an entity, and splits an update to an entity into multiple updates to whichever table(s) contributed to that entity.
Query and update pipeline, processes queries, filters and updates requests to convert them into canonical command trees which are then converted into store-specific queries by the map provider.
Metadata services, which handle all metadata related to entities, relationships and mappings.
Transactions, to integrate with transactional capabilities of the underlying store. If the underlying store does not support transactions, support for it needs to be implemented at this layer.
Conceptual layer API, the runtime that exposes the programming model for coding against the conceptual schema. It follows the ADO.NET pattern of using Connection objects to refer to the map provider, using Command objects to send the query, and returning EntityResultSets or EntitySets containing the result.
Disconnected components, which locally cache datasets and entity sets for using the ADO.NET Entity Framework in an occasionally connected environment.
Embedded database: ADO.NET Entity Framework includes a lightweight embedded database for client-side caching and querying of relational data.
Design tools, such as Mapping Designer, are also included with ADO.NET Entity Framework, which simplifies the job of mapping a conceptual schema to the relational schema and specifying which properties of an entity type correspond to which table in the database.
Programming layer, which exposes the EDM as programming constructs which can be consumed by programming languages.
Object services, automatically generate code for CLR classes that expose the same properties as an entity, thus enabling instantiation of entities as .NET objects.
Web services, which expose entities as web services.
High-level services, such as reporting services which work on entities rather than relational data.
== Entity Data Model ==
The Entity Data Model (EDM) specifies the conceptual model (CSDL) of the data, using a modelling technique that is itself called Entity Data Model, an extended version of the entity–relationship model.
The data model primarily describes the Entities and the Associations they participate in. The EDM schema is expressed in the Schema Definition Language (SDL), which is an application of XML (Extended markup language). In addition, the mapping (MSL) of the elements of the conceptual schema (CSDL) to the storage schema (SSDL) must also be specified. The mapping specification is also expressed in XML.
Visual Studio also provides the Entity Designer for visual creation of the EDM and the mapping specification. This approach is named as "Model First" approach, as alternatives to "Code First" and "Database First" approaches. The output of the tool is the XML file (*.edmx) specifying the schema and the mapping. Edmx file contains EF metadata artifacts (CSDL/MSL/SSDL content). These three files (csdl, msl, ssdl) can also be created or edited by hand. The "Model First" approach is not going to be supported in EF Core version.
=== Mapping ===
Entity Data Model Wizard in Visual Studio initially generates a one-to-one (1:1) mapping between the database schema and the conceptual schema in most of the cases. In the relational schema, the elements are composed of the tables, with the primary and foreign keys gluing the related tables together. In contrast, the Entity Types define the conceptual schema of the data.
The entity types are an aggregation of multiple typed fields – each field maps to a certain column in the database – and can contain information from multiple physical tables. The entity types can be related to each other, independent of the relationships in the physical schema. Related entities are also exposed similarly – via a field whose name denotes the relation they are participating in and accessing which, instead of retrieving the value from some column in the database, traverses the relationship and returns the entity (or a collection of entities) with which it is related.
Entity Types form the class of objects entities conform to, with the Entities being instances of the entity types. Entities represent individual objects that form a part of the problem being solved by the application and are indexed by a key. For example, converting the physical schema described above, we will have two entity types:
CustomerEntity, which contains the customer's name from the Customers table, and the customer's address from the Contacts table.
OrderEntity, which encapsulates the orders of a certain customer, retrieving it from the Orders table.
The logical schema and its mapping with the physical schema is represented as an Entity Data Model (EDM), specified as an XML file. ADO.NET Entity Framework uses the EDM to actually perform the mapping letting the application work with the entities, while internally abstracting the use of ADO.NET constructs like DataSet and RecordSet. ADO.NET Entity Framework performs the joins necessary to have entity reference information from multiple tables, or when a relationship is traversed. When an entity is updated, it traces back which table the information came from and issues SQL update statements to update the tables in which some data has been updated. ADO.NET Entity Framework uses eSQL, a derivative of SQL, to perform queries, set-theoretic operations, and updates on entities and their relationships. Queries in eSQL, if required, are then translated to the native SQL flavor of the underlying database.
Entity types and entity sets just form the logical EDM schema, and can be exposed as anything. ADO.NET Entity Framework includes Object Service that presents these entities as Objects with the elements and relationships exposed as properties. Thus Entity objects are just front-end to the instances of the EDM entity types, which lets Object Oriented languages access and use them. Similarly, other front-ends can be created, which expose the entities via web services (e.g., WCF Data Services) or XML that is used when entities are serialized for persistence storage or over-the-wire transfer.
=== Entities ===
Entities** are instances of EntityTypes; they represent the individual instances of the objects (such as customer, orders) to which the information pertains. The identity of an entity is defined by the entity type it is an instance of; in that sense an entity type defines the class an entity belongs to and also defines what properties an entity will have. Properties describe some aspect of the entity by giving it a name and a type. The properties of an entity type in ADO.NET Entity Framework are fully typed, and are fully compatible with the type system used in a DBMS system, as well as the Common Type System of the .NET Framework. A property can be SimpleType, or ComplexType, and can be multi-valued as well. All EntityTypes belong to some namespace, and have an EntityKey property that uniquely identifies each instance of the entity type. The different property types are distinguished as follows:
SimpleType, corresponds to primitive data types such as Integer, Characters and Floating Point numbers.
ComplexType, is an aggregate of multiple properties of type SimpleType, or ComplexType. Unlike EntityTypes, however, ComplexTypes cannot have an EntityKey. In Entity Framework v1 ComplexTypes cannot be inherited.
All entity instances are housed in EntityContainers, which are per-project containers for entities. Each project has one or more named EntityContainers, which can reference entities across multiple namespaces and entity types. Multiple instances of one entity type can be stored in collections called EntitySets. One entity type can have multiple EntitySets.
EDM primitive types (simple types):
=== Relationships ===
Any two entity types can be related, by either an Association relation or a Containment relation. For example, a shipment is billed to a customer is an association whereas an order contains order details is a containment relation. A containment relation can also be used to model inheritance between entities. The relation between two entity types is specified by a Relationship Type, instances of which, called Relationships, relate entity instances. In future releases, other kinds of relationship types such as Composition, or Identification, may be introduced.
Relationship types are characterized by their degree (arity) or the count of entity types they relate and their multiplicity. However, in the initial release of ADO.NET Entity Framework, relationships are limited to a binary (of degree two) bi-directional relationship. Multiplicity defines how many entity instances can be related together. Based on multiplicity, relationships can be either one-to-one, one-to-many, or many-to-many. Relationships between entities are named; the name is called a Role. It defines the purpose of the relationship.
A relationship type can also have an Operation or Action associated with it, which allows some action to be performed on an entity in the event of an action being performed on a related entity. A relationship can be specified to take an Action when some Operation is done on a related entity. For example, on deleting an entity that forms the part of a relation (the OnDelete operation) the actions that can be taken are:
Cascade, which instructs to delete the relationship instance and all associated entity instances.
None.
For association relationships, which can have different semantics at either ends, different actions can be specified for either end.
=== Schema definition language ===
ADO.NET Entity Framework uses an XML based Data Definition Language called Schema Definition Language (SDL) to define the EDM Schema. The SDL defines the SimpleTypes similar to the CTS primitive types, including String, Int32, Double, Decimal, Guid, and DateTime, among others. An Enumeration, which defines a map of primitive values and names, is also considered a simple type. Enumerations are supported from framework version 5.0 onwards only. ComplexTypes are created from an aggregation of other types. A collection of properties of these types define an Entity Type. This definition can be written in EBNF grammar as:
Facets are used to describe metadata of a property, such as whether it is nullable or has a default value, as also the cardinality of the property, i.e., whether the property is single valued or multi valued. A multiplicity of “1” denotes a single valued property; a “*” means it is a multi-valued property. As an example, an entity can be denoted in SDL as:
A relationship type is defined as specifying the end points and their multiplicities. For example, a one-to-many relationship between Customer and Orders can be defined as
== Querying data ==
=== Entity SQL ===
ADO.NET Entity Framework uses a variant of the Structured Query Language, named Entity SQL, which is aimed at writing declarative queries and updates over entities and entity relationships – at the conceptual level. It differs from SQL in that it does not have explicit constructs for joins because the EDM is designed to abstract partitioning data across tables.
Querying against the conceptual model is facilitated by EntityClient classes, which accepts an Entity SQL query. The query pipeline parses the Entity SQL query into a command tree, segregating the query across multiple tables, which is handed over to the EntityClient provider. Like ADO.NET data providers, an EntityClient provider is also initialized using a Connection object, which in addition to the usual parameters of data store and authentication info, requires the SDL schema and the mapping information. The EntityClient provider in turn then turns the Entity SQL command tree into an SQL query in the native flavor of the database. The execution of the query then returns an Entity SQL ResultSet, which is not limited to a tabular structure, unlike ADO.NET ResultSets.
Entity SQL enhances SQL by adding intrinsic support for:
Types, as ADO.NET entities are fully typed.
EntitySets, which are treated as collections of entities.
Composability, which removes restrictions on where subqueries can be used.
==== Entity SQL canonical functions ====
Canonical functions are supported by all Entity Framework compliant data providers. They can be used in an Entity SQL query. Also, most of the extension methods in LINQ to Entities are translated to canonical functions. They are independent of any specific database. When ADO.NET data provider receives a function, it translates it to the desired SQL statement.
But not all DBMSs have equivalent functionality and a set of standard embedded functions. There are also differences in the accuracy of calculations. Therefore, not all canonical functions are supported for all databases, and not all canonical functions return the same results.
=== LINQ to Entities ===
The LINQ to Entities provider allows LINQ to be used to query various RDBMS data sources. Several database server specific providers with Entity Framework support are available.
=== Native SQL ===
In the Entity Framework v4 new methods ExecuteStoreQuery() and ExecuteStoreCommand() were added to the class ObjectContext.
=== Visualizers ===
Visual Studio has a feature called Visualizer. A LINQ query written in Visual Studio can be viewed as Native SQL using a Visualizer during debug session. A Visualizer for LINQ to Entities (Object Query) targeting all RDBMS is available in the Visual Studio Marketplace.
== Performance Profiling ==
Various profilers are commercially available to troubleshoot performance issues using Entity Framework, both for EF and EF Core variants.
== Tools and Extensions - Entity Framework Core ==
Entity Framework Core Tools and Extensions are available to enhance the performance of Entity Framework Core.
== Tools and Extensions - Entity Framework EF6 ==
Entity Framework Tools and Extensions are available to enhance the performance of Entity Framework.
== See also ==
List of object–relational mapping software
LINQ to SQL
.NET Persistence API (NPA)
LLBLGEN Pro
== References ==
== Bibliography ==
== External links ==
The ADO.NET Entity Framework (at Data Developer Center)
EntityFramework on GitHub | Wikipedia/Entity_Data_Model |
The term conceptual model refers to any model that is formed after a conceptualization or generalization process. Conceptual models are often abstractions of things in the real world, whether physical or social. Semantic studies are relevant to various stages of concept formation. Semantics is fundamentally a study of concepts, the meaning that thinking beings give to various elements of their experience.
== Overview ==
=== Concept models and conceptual models ===
The value of a conceptual model is usually directly proportional to how well it corresponds to a past, present, future, actual or potential state of affairs. A concept model (a model of a concept) is quite different because in order to be a good model it need not have this real world correspondence. In artificial intelligence, conceptual models and conceptual graphs are used for building expert systems and knowledge-based systems; here the analysts are concerned to represent expert opinion on what is true not their own ideas on what is true.
=== Type and scope of conceptual models ===
Conceptual models range in type from the more concrete, such as the mental image of a familiar physical object, to the formal generality and abstractness of mathematical models which do not appear to the mind as an image. Conceptual models also range in terms of the scope of the subject matter that they are taken to represent. A model may, for instance, represent a single thing (e.g. the Statue of Liberty), whole classes of things (e.g. the electron), and even very vast domains of subject matter such as the physical universe. The variety and scope of conceptual models is due to the variety of purposes for using them.
Conceptual modeling is the activity of formally describing some aspects of the physical and social world around us for the purposes of understanding and communication.
=== Fundamental objectives ===
A conceptual model's primary objective is to convey the fundamental principles and basic functionality of the system which it represents. Also, a conceptual model must be developed in such a way as to provide an easily understood system interpretation for the model's users. A conceptual model, when implemented properly, should satisfy four fundamental objectives.
Enhance an individual's understanding of the representative system
Facilitate efficient conveyance of system details between stakeholders
Provide a point of reference for system designers to extract system specifications
Document the system for future reference and provide a means for collaboration
The conceptual model plays an important role in the overall system development life cycle. Figure 1 below, depicts the role of the conceptual model in a typical system development scheme. It is clear that if the conceptual model is not fully developed, the execution of fundamental system properties may not be implemented properly, giving way to future problems or system shortfalls. These failures do occur in the industry and have been linked to; lack of user input, incomplete or unclear requirements, and changing requirements. Those weak links in the system design and development process can be traced to improper execution of the fundamental objectives of conceptual modeling. The importance of conceptual modeling is evident when such systemic failures are mitigated by thorough system development and adherence to proven development objectives/techniques.
== Modelling techniques ==
Numerous techniques can be applied across multiple disciplines to increase the user's understanding of the system to be modeled. A few techniques are briefly described in the following text, however, many more exist or are being developed. Some commonly used conceptual modeling techniques and methods include: workflow modeling, workforce modeling, rapid application development, object-role modeling, and the Unified Modeling Language (UML).
=== Data flow modeling ===
Data flow modeling (DFM) is a basic conceptual modeling technique that graphically represents elements of a system. DFM is a fairly simple technique; however, like many conceptual modeling techniques, it is possible to construct higher and lower level representative diagrams. The data flow diagram usually does not convey complex system details such as parallel development considerations or timing information, but rather works to bring the major system functions into context. Data flow modeling is a central technique used in systems development that utilizes the structured systems analysis and design method (SSADM).
=== Entity relationship modeling ===
Entity–relationship modeling (ERM) is a conceptual modeling technique used primarily for software system representation. Entity-relationship diagrams, which are a product of executing the ERM technique, are normally used to represent database models and information systems. The main components of the diagram are the entities and relationships. The entities can represent independent functions, objects, or events. The relationships are responsible for relating the entities to one another. To form a system process, the relationships are combined with the entities and any attributes needed to further describe the process. Multiple diagramming conventions exist for this technique; IDEF1X, Bachman, and EXPRESS, to name a few. These conventions are just different ways of viewing and organizing the data to represent different system aspects.
=== Event-driven process chain ===
The event-driven process chain (EPC) is a conceptual modeling technique which is mainly used to systematically improve business process flows. Like most conceptual modeling techniques, the event driven process chain consists of entities/elements and functions that allow relationships to be developed and processed. More specifically, the EPC is made up of events which define what state a process is in or the rules by which it operates. In order to progress through events, a function/ active event must be executed. Depending on the process flow, the function has the ability to transform event states or link to other event driven process chains. Other elements exist within an EPC, all of which work together to define how and by what rules the system operates. The EPC technique can be applied to business practices such as resource planning, process improvement, and logistics.
=== Joint application development ===
The dynamic systems development method uses a specific process called JEFFF to conceptually model a systems life cycle. JEFFF is intended to focus more on the higher level development planning that precedes a project's initialization. The JAD process calls for a series of workshops in which the participants work to identify, define, and generally map a successful project from conception to completion. This method has been found to not work well for large scale applications, however smaller applications usually report some net gain in efficiency.
=== Place/transition net ===
Also known as Petri nets, this conceptual modeling technique allows a system to be constructed with elements that can be described by direct mathematical means. The petri net, because of its nondeterministic execution properties and well defined mathematical theory, is a useful technique for modeling concurrent system behavior, i.e. simultaneous process executions.
=== State transition modeling ===
State transition modeling makes use of state transition diagrams to describe system behavior. These state transition diagrams use distinct states to define system behavior and changes. Most current modeling tools contain some kind of ability to represent state transition modeling. The use of state transition models can be most easily recognized as logic state diagrams and directed graphs for finite-state machines.
=== Technique evaluation and selection ===
Because the conceptual modeling method can sometimes be purposefully vague to account for a broad area of use, the actual application of concept modeling can become difficult. To alleviate this issue, and shed some light on what to consider when selecting an appropriate conceptual modeling technique, the framework proposed by Gemino and Wand will be discussed in the following text. However, before evaluating the effectiveness of a conceptual modeling technique for a particular application, an important concept must be understood; Comparing conceptual models by way of specifically focusing on their graphical or top level representations is shortsighted. Gemino and Wand make a good point when arguing that the emphasis should be placed on a conceptual modeling language when choosing an appropriate technique. In general, a conceptual model is developed using some form of conceptual modeling technique. That technique will utilize a conceptual modeling language that determines the rules for how the model is arrived at. Understanding the capabilities of the specific language used is inherent to properly evaluating a conceptual modeling technique, as the language reflects the techniques descriptive ability. Also, the conceptual modeling language will directly influence the depth at which the system is capable of being represented, whether it be complex or simple.
==== Considering affecting factors ====
Building on some of their earlier work, Gemino and Wand acknowledge some main points to consider when studying the affecting factors: the content that the conceptual model must represent, the method in which the model will be presented, the characteristics of the model's users, and the conceptual model languages specific task. The conceptual model's content should be considered in order to select a technique that would allow relevant information to be presented. The presentation method for selection purposes would focus on the technique's ability to represent the model at the intended level of depth and detail. The characteristics of the model's users or participants is an important aspect to consider. A participant's background and experience should coincide with the conceptual model's complexity, else misrepresentation of the system or misunderstanding of key system concepts could lead to problems in that system's realization. The conceptual model language task will further allow an appropriate technique to be chosen. The difference between creating a system conceptual model to convey system functionality and creating a system conceptual model to interpret that functionality could involve two completely different types of conceptual modeling languages.
==== Considering affected variables ====
Gemino and Wand go on to expand the affected variable content of their proposed framework by considering the focus of observation and the criterion for comparison. The focus of observation considers whether the conceptual modeling technique will create a "new product", or whether the technique will only bring about a more intimate understanding of the system being modeled. The criterion for comparison would weigh the ability of the conceptual modeling technique to be efficient or effective. A conceptual modeling technique that allows for development of a system model which takes all system variables into account at a high level may make the process of understanding the system functionality more efficient, but the technique lacks the necessary information to explain the internal processes, rendering the model less effective.
When deciding which conceptual technique to use, the recommendations of Gemino and Wand can be applied in order to properly evaluate the scope of the conceptual model in question. Understanding the conceptual models scope will lead to a more informed selection of a technique that properly addresses that particular model. In summary, when deciding between modeling techniques, answering the following questions would allow one to address some important conceptual modeling considerations.
What content will the conceptual model represent?
How will the conceptual model be presented?
Who will be using or participating in the conceptual model?
How will the conceptual model describe the system?
What is the conceptual models focus of observation?
Will the conceptual model be efficient or effective in describing the system?
Another function of the simulation conceptual model is to provide a rational and factual basis for assessment of simulation application appropriateness.
== Models in philosophy and science ==
=== Mental model ===
In cognitive psychology and philosophy of mind, a mental model is a representation of something in the mind, but a mental model may also refer to a nonphysical external model of the mind itself.
=== Metaphysical models ===
A metaphysical model is a type of conceptual model which is distinguished from other conceptual models by its proposed scope; a metaphysical model intends to represent reality in the broadest possible way. This is to say that it explains the answers to fundamental questions such as whether matter and mind are one or two substances; or whether or not humans have free will.
=== Epistemological models ===
An epistemological model is a type of conceptual model whose proposed scope is the known and the knowable, and the believed and the believable.
=== Logical models ===
In logic, a model is a type of interpretation under which a particular statement is true. Logical models can be broadly divided into ones which only attempt to represent concepts, such as mathematical models; and ones which attempt to represent physical objects, and factual relationships, among which are scientific models.
Model theory is the study of (classes of) mathematical structures such as groups, fields, graphs, or even universes of set theory, using tools from mathematical logic. A system that gives meaning to the sentences of a formal language is called a model for the language. If a model for a language moreover satisfies a particular sentence or theory (set of sentences), it is called a model of the sentence or theory. Model theory has close ties to algebra and universal algebra.
=== Mathematical models ===
Mathematical models can take many forms, including but not limited to dynamical systems, statistical models, differential equations, or game theoretic models. These and other types of models can overlap, with a given model involving a variety of abstract structures.
=== Scientific models ===
A scientific model is a simplified abstract view of a complex reality. A scientific model represents empirical objects, phenomena, and physical processes in a logical way. Attempts to formalize the principles of the empirical sciences use an interpretation to model reality, in the same way logicians axiomatize the principles of logic. The aim of these attempts is to construct a formal system that will not produce theoretical consequences that are contrary to what is found in reality. Predictions or other statements drawn from such a formal system mirror or map the real world only insofar as these scientific models are true.
== Statistical models ==
A statistical model is a probability distribution function proposed as generating data. In a parametric model, the probability distribution function has variable parameters, such as the mean and variance in a normal distribution, or the coefficients for the various exponents of the independent variable in linear regression. A nonparametric model has a distribution function without parameters, such as in bootstrapping, and is only loosely confined by assumptions. Model selection is a statistical method for selecting a distribution function within a class of them; e.g., in linear regression where the dependent variable is a polynomial of the independent variable with parametric coefficients, model selection is selecting the highest exponent, and may be done with nonparametric means, such as with cross validation.
In statistics there can be models of mental events as well as models of physical events. For example, a statistical model of customer behavior is a model that is conceptual (because behavior is physical), but a statistical model of customer satisfaction is a model of a concept (because satisfaction is a mental not a physical event).
== Social and political models ==
=== Economic models ===
In economics, a model is a theoretical construct that represents economic processes by a set of variables and a set of logical and/or quantitative relationships between them. The economic model is a simplified framework designed to illustrate complex processes, often but not always using mathematical techniques. Frequently, economic models use structural parameters. Structural parameters are underlying parameters in a model or class of models. A model may have various parameters and those parameters may change to create various properties.
== Models in systems architecture ==
A system model is the conceptual model that describes and represents the structure, behavior, and more views of a system. A system model can represent multiple views of a system by using two different approaches. The first one is the non-architectural approach and the second one is the architectural approach. The non-architectural approach respectively picks a model for each view. The architectural approach, also known as system architecture, instead of picking many heterogeneous and unrelated models, will use only one integrated architectural model.
=== Business process modelling ===
In business process modelling the enterprise process model is often referred to as the business process model. Process models are core concepts in the discipline of process engineering. Process models are:
Processes of the same nature that are classified together into a model.
A description of a process at the type level.
Since the process model is at the type level, a process is an instantiation of it.
The same process model is used repeatedly for the development of many applications and thus, has many instantiations.
One possible use of a process model is to prescribe how things must/should/could be done in contrast to the process itself which is really what happens. A process model is roughly an anticipation of what the process will look like. What the process shall be will be determined during actual system development.
== Models in information system design ==
=== Conceptual models of human activity systems ===
Conceptual models of human activity systems are used in soft systems methodology (SSM), which is a method of systems analysis concerned with the structuring of problems in management. These models are models of concepts; the authors specifically state that they are not intended to represent a state of affairs in the physical world. They are also used in information requirements analysis (IRA) which is a variant of SSM developed for information system design and software engineering.
=== Logico-linguistic models ===
Logico-linguistic modeling is another variant of SSM that uses conceptual models. However, this method combines models of concepts with models of putative real world objects and events. It is a graphical representation of modal logic in which modal operators are used to distinguish statement about concepts from statements about real world objects and events.
=== Data models ===
==== Entity–relationship model ====
In software engineering, an entity–relationship model (ERM) is an abstract and conceptual representation of data. Entity–relationship modeling is a database modeling method, used to produce a type of conceptual schema or semantic data model of a system, often a relational database, and its requirements in a top-down fashion. Diagrams created by this process are called entity-relationship diagrams, ER diagrams, or ERDs.
Entity–relationship models have had wide application in the building of information systems intended to support activities involving objects and events in the real world. In these cases they are models that are conceptual. However, this modeling method can be used to build computer games or a family tree of the Greek Gods, in these cases it would be used to model concepts.
==== Domain model ====
A domain model is a type of conceptual model used to depict the structural elements and their conceptual constraints within a domain of interest (sometimes called the problem domain). A domain model includes the various entities, their attributes and relationships, plus the constraints governing the conceptual integrity of the structural model elements comprising that problem domain. A domain model may also include a number of conceptual views, where each view is pertinent to a particular subject area of the domain or to a particular subset of the domain model which is of interest to a stakeholder of the domain model.
Like entity–relationship models, domain models can be used to model concepts or to model real world objects and events.
== See also ==
== References ==
== Further reading ==
J. Parsons, L. Cole (2005), "What do the pictures mean? Guidelines for experimental evaluation of representation fidelity in diagrammatical conceptual modeling techniques", Data & Knowledge Engineering 55: 327–342; doi:10.1016/j.datak.2004.12.008
A. Gemino, Y. Wand (2005), "Complexity and clarity in conceptual modeling: Comparison of mandatory and optional properties", Data & Knowledge Engineering 55: 301–326; doi:10.1016/j.datak.2004.12.009
D. Batra (2005), "Conceptual Data Modeling Patterns", Journal of Database Management 16: 84–106
Papadimitriou, Fivos. (2010). "Conceptual Modelling of Landscape Complexity". Landscape Research, 35(5):563-570. doi:10.1080/01426397.2010.504913
== External links ==
Models article in the Internet Encyclopedia of Philosophy | Wikipedia/Conceptual_modeling |
Relational Model/Tasmania (RM/T) was published by Edgar F. Codd in 1979 and is the name given to a number of extensions to his original relational model (RM) published in 1970. The overall goal of the RM/T was to define some fundamental semantic units, at "atomic" and "molecular" levels, for data modelling. Codd writes: "the result is a model with a richer variety of objects than the original relational model, additional insert-update-delete rules and some additional operators that make the algebra more powerful."
== RM history ==
Between 1968 and 1988 Codd published over 30 papers on the relational model (RM) - the most famous of which is his 1970 paper. Up to 1978 the papers describe RM Version 1 (RM/V1). In early 1979 Codd first presented some new ideas, called RM/T ('T' for Tasmania), at an invited talk for the Australian Computer Science Conference in Hobart, Tasmania. Later that year the ACM journal published a paper on RM/T, in which Codd acknowledges the influence of Schmid & Swensen (1975) and Wiederhold (1977).
A later version of RM/T (we shall call it here "RM/D") was described by Chris Date in Date (1983) in which Date and Codd improved and refined RM/T, adding an entity type called designative. Although Codd writes nothing about this new type, Date offers a rationale in Date (1983, page 262). Date revised this 1983 article in Date (1995), which additionally compares the RM/T model with the E/R model.
Following a disappointing uptake of RM/T by the database industry, Codd decided to introduce the RM/T model more gradually. He planned to release a sequence of RM versions: RM/V2, RM/V3 etc. each time progressively including some of the ideas of the original RM/T into the new version. Perhaps this explains why there is no obvious mapping of concepts between RM/T and RM/V2. For example, there is no reference to associative or designative entity types in Codd's 1990 book that defines RM/V2. On the other hand, the book extends and builds on the existing body of query language issues, many of which were addressed by Codd in several papers throughout the 1980s.
== Summary of RM/T ==
Introducing some of the new concepts of RM/T:
Surrogates
A surrogate is a unique value assigned to each entity. If two relations use the same surrogate value then they represent the same entity in the modelled universe. The surrogate value can be any unique string or number but cannot be assigned or changed by the database user. For example, a SQL SEQUENCE is often used to generate numerical surrogate values. This use of surrogate was first introduced in Hall, Owlett and Todd in 1976.
Entities and Nonentities
An entity is some thing in the modelled universe and is typically identified by a surrogate. A nonentity is some thing that is not an entity and does not have its own identifying surrogate. An independent entity has its own surrogate. A dependent entity has a surrogate but it belongs to another entity, i.e. the surrogate is a foreign key.
Atomic Semantics
The RM/T addresses atomic semantics by describing how the original RM relation can be used to describe entities with attributes. An entity is represented as an Entity-relation or E-relation and its attributes (or immediate properties) are stored in separate Property-relations or P-relations. Each E-relation shares its surrogate with the associated P-relations.
E-relations
Mark the existence of an entity. An E-relation is a relation (table) storing only the surrogates for a particular entity type. A surrogate value entered into the E-relation table implies the corresponding existence of an entity of that type in the modelled world. For example, the E-relation "Employee" is a table containing the surrogates of all entities of type Employee.
P-relations
Store the attribute values of an entity. A P-relation is a relation (table) storing the surrogate and one or more attributes of an entity. The surrogate value of a P-relation is that of the corresponding E-relation; it plays the role (K-role) of the primary key for that P-relation. For example, the P-relation "Employee_Number" is a table with two columns: one containing the surrogate value of the "Employee" E-relation, the other containing the employee number.
Note that by performing an OUTER NATURAL JOIN on the RM/T "Employee" E-relation and "Employee_Person" P-relation we can construct the RM/V1 "Employee" relation. This illustrates why the E-relation and P-relation concepts of RM/T are more atomic than the relation concept of RM/V1.
Molecular Semantics
The RM/T addresses molecular semantics by taking the original RM and categorising the relations into several entity types, increasing the information captured by the semantic data model. However Codd does not define a notation for diagramming his new semantics. Each entity may play several roles at once and thus belong to one or more of the following entity types:
Characteristic – subordinate entities that describe kernel entities.
Associative – superordinate entities that interrelate kernel entities.
Kernel – entities that are neither characteristic or associative.
Codd goes on to introduce subtyping of entities, giving yet another qualifier for entities:
Inner – entities that are not subtypes of another entity.
Hence Codd speaks of inner kernel and inner associative entities.
The following definition is based on the RM/D model in Date (1983); it does not appear in Codd (1979):
Designative – entities that contain a designation. A designative entity is at the many end of a one-to-many relationship between two independent entities. For example, a writer may write many books, hence a one-to-many relationship between writer and book entities; the book is the designative entity because it contains a designation (or designative reference) to the writer - namely the primary key of the writer entity. Note that an associative entity contains at least two designations. For example, we can regard a booking as either an entity that associates a person with a flight, or as an entity that designates a person and designates a flight. Hence a designative entity must contain at least one designation whereas an associative entity must contain at least two designations.
Associations
These are what we might otherwise call relationships between entities or non-entities.
The value E-null is used when deleteting entities from the RM/T model; all associations that have surrogates referring to a non-existing entity are assigned the value E-null, meaning the entity is unknown.
Associative Entity and Nonentity Association
An associative entity is an entity that represents an association between two independent entities; the associative entity is an entity in itself because it has a surrogate. A nonentity association is similar to an associative entity however it has no surrogate. This lack of a surrogate stops the nonentity association from having, for example, any descriptive characteristic entities.
Directed Graph Relations
Several directed graph relations are defined to capture further semantic features of the RM/T model. These graphs are named as follows:
PG-relation (Property Graph) stores property relationships
CG-relation (Characteristic Graph) stores characteristic relationships
AG-relation (Association Graph) stores association relationships
UGI-relation (Unconditional Generalisation by Inclusion) stores generalisation by inclusion relationships
AGI-relation (Alternative Generalisation by Inclusion) stores generalisation by alternative relationships
US-relation (Unconditional Successor) stores unconditional successor relationships
AS-relation (Alternative Successor) stores alternative successor relationships
KG-relation (Cover Membership) stores cover membership relationships
UP-relation (Unconditional Precedence) stores unconditional succession of event relationships
AP-relation (Alternative Precedence) stores alternative succession of event relationships
RM/T Catalog
The Catalog is a meta-model storing the descriptions of the relations themselves. The RM/T Catalog comprises the following relations:
CATR (R-surrogate, relname, RelType) describes relations
CATRA (RA-surrogate, R-surrogate, A-surrogate) relates relations and attributes
CATA (A-surrogate, attname, UserKey) describes attributes
CATAD (AD-surrogate, A-surrogate, D-surrogate) relates attributes and domains
CATD (D-surrogate, domname, VType, Ordering) describes domains
CATC (C-surrogate, pername) describes categories
CATRC (RC-surrogate, R-surrogate, C-surrogate) relates relations and categories
where
relname is the textual name of a relation. e.g. "Address"
attname is the textual name of an attribute. e.g. "Street"
domname is the textual name of a domain. e.g. "Salary"
pername is the category label (from the PER-domain)
RN-domain is the domain of all relnames in the database
PER-domain is the domain of all category labels
E-domain is the domain of all surrogates in the database
E-attribute is any attribute that plays the role of a surrogate (from the E-domain)
E-null is the "entity unknown" surrogate (from the E-domain)
R-surrogate is the relation surrogate (from the E-domain)
A-surrogate is the attribute surrogate (from the E-domain)
D-surrogate is the domain surrogate (from the E-domain)
C-surrogate is the category label surrogate (from the E-domain)
RA-surrogate is the relation-attribute surrogate (from the E-domain)
AD-surrogate is the attribute-domain surrogate (from the E-domain)
RC-surrogate is the relation-category-label surrogate (from the E-domain)
RelType is the type of object represented by the relation
UserKey shows whether the attribute participates in a user-defined key
VType is the syntactic type of the value
Ordering shows whether the operator > is applicable between values of the domain
Operators
Numerous operators are defined on names, sets and graphs. See Codd's 1979 paper for details.
== RM/T today ==
There is little mention of RM/T today and no articles have appeared recently. Peckam and Maryanski (1988) wrote about RM/T in their study of semantic data models. Codd published his book in 1990 but wrote nothing more about RM/T. RM/V1 and RM/V2 have a chapter each in Date and Darwen (1992) and the Date (1983) article was updated in (1995) and now contains a long overdue comparison of the E/R model and RM/T. Date's most recent reflections can be found on the Web at Date (1999), The Database Relational Model (2001) and Date on RM/T (2003).
RM/T contributed to the body of knowledge called semantic data modeling and semantic object modeling and continues to influence new data modellers. See the paper by Hammer and McLeod (1981), the book by Knoenke (2001) and implementation by Grabczewski et alia (2004).
== References ==
== Further reading ==
Cater, Arthur. "Codd's Extended Relational Model" (PDF). University College Dublin.
Codd, E. F. (1970). "A relational model of data for large shared data banks". Communications of the ACM. 13 (6): 377–387. doi:10.1145/362384.362685.
Codd, E. F. (1979). "Extending the database relational model to capture more meaning". ACM Transactions on Database Systems. 4 (4): 397–434. doi:10.1145/320107.320109.
Codd, E. F. (1990). The Relational Model for Data Base Management: Version 2. ISBN 0201141922.
Date, C. J. (1983). An Introduction to Data Base Systems. Vol. 2. ISBN 0201144743.
Date, C. J. (1986). "A Practical Approach to Database Design". Relational Database: Selected Writings.
Date, C. J.; Darwen, Hugh (1992). Relational Database Writings 1989–1991. ISBN 0201543036.
Date, C. J. (1995). Relational Database Writings 1991–1994. ISBN 0201824590.
Date, C. J. (1999). "Thirty Years of Relational: Extending the Relational Model".
Date, C. J. (2001). The Database Relational Model: A Retrospective Review and Analysis.
Grabczewski, E.; Crompton, S.; Robinson, S. K.; Hall, T. H. (2004). "A Corporate Data Repository for CCLRC using CERIF".
Hammer, M.; McLeod, D. (1981). "Database Description with SDM: A Semantic Database Model". doi:10.1145/319587.319588.
Kroenke, David M. (2001). Database Processing (Eighth ed.). ISBN 0130648396.
Peckam, J.; Maryanski, F. (1988). "Semantic Data Models". ACM Computing Surveys. 20 (3): 153–189. doi:10.1145/62061.62062. S2CID 19006625.; a useful survey that includes RM/T.
Schmid, H. A.; Swensen, J. R. (1975). "On the semantics of the relational data model". Proceedings of the 1975 ACM SIGMOD international conference on Management of data - SIGMOD '75. p. 211. doi:10.1145/500080.500110.
Wiederhold, G. (1977). "Database Design". | Wikipedia/Relational_Model/Tasmania |
Datavault or data vault modeling is a database modeling method that is designed to provide long-term historical storage of data coming in from multiple operational systems. It is also a method of looking at historical data that deals with issues such as auditing, tracing of data, loading speed and resilience to change as well as emphasizing the need to trace where all the data in the database came from. This means that every row in a data vault must be accompanied by record source and load date attributes, enabling an auditor to trace values back to the source. The concept was published in 2000 by Dan Linstedt.
Data vault modeling makes no distinction between good and bad data ("bad" meaning not conforming to business rules). This is summarized in the statement that a data vault stores "a single version of the facts" (also expressed by Dan Linstedt as "all the data, all of the time") as opposed to the practice in other data warehouse methods of storing "a single version of the truth" where data that does not conform to the definitions is removed or "cleansed". A data vault enterprise data warehouse provides both; a single version of facts and a single source of truth.
The modeling method is designed to be resilient to change in the business environment where the data being stored is coming from, by explicitly separating structural information from descriptive attributes. Data vault is designed to enable parallel loading as much as possible, so that very large implementations can scale out without the need for major redesign.
Unlike the star schema (dimensional modelling) and the classical relational model (3NF), data vault and anchor modeling are well-suited for capturing changes that occur when a source system is changed or added, but are considered advanced techniques which require experienced data architects. Both data vaults and anchor models are entity-based models, but anchor models have a more normalized approach.
== History and philosophy ==
In its early days, Dan Linstedt referred to the modeling technique which was to become data vault as common foundational warehouse architecture or common foundational modeling architecture. In data warehouse modeling there are two well-known competing options for modeling the layer where the data are stored. Either you model according to Ralph Kimball, with conformed dimensions and an enterprise data bus, or you model according to Bill Inmon with the database normalized. Both techniques have issues when dealing with changes in the systems feeding the data warehouse. For conformed dimensions you also have to cleanse data (to conform it) and this is undesirable in a number of cases since this inevitably will lose information. Data vault is designed to avoid or minimize the impact of those issues, by moving them to areas of the data warehouse that are outside the historical storage area (cleansing is done in the data marts) and by separating the structural items (business keys and the associations between the business keys) from the descriptive attributes.
Dan Linstedt, the creator of the method, describes the resulting database as follows:
"The Data Vault Model is a detail oriented, historical tracking and uniquely linked set of normalized tables that support one or more functional areas of business. It is a hybrid approach encompassing the best of breed between 3rd normal form (3NF) and star schema. The design is flexible, scalable, consistent and adaptable to the needs of the enterprise"
Data vault's philosophy is that all data is relevant data, even if it is not in line with established definitions and business rules. If data are not conforming to these definitions and rules then that is a problem for the business, not the data warehouse. The determination of data being "wrong" is an interpretation of the data that stems from a particular point of view that may not be valid for everyone, or at every point in time. Therefore the data vault must capture all data and only when reporting or extracting data from the data vault is the data being interpreted.
Another issue to which data vault is a response is that more and more there is a need for complete auditability and traceability of all the data in the data warehouse. Due to Sarbanes-Oxley requirements in the USA and similar measures in Europe this is a relevant topic for many business intelligence implementations, hence the focus of any data vault implementation is complete traceability and auditability of all information.
Data Vault 2.0 is the new specification. It is an open standard. The new specification consists of three pillars: methodology (SEI/CMMI, Six Sigma, SDLC, etc..), the architecture (amongst others an input layer (data stage, called persistent staging area in Data Vault 2.0) and a presentation layer (data mart), and handling of data quality services and master data services), and the model. Within the methodology, the implementation of best practices is defined. Data Vault 2.0 has a focus on including new components such as big data, NoSQL - and also focuses on the performance of the existing model. The old specification (documented here for the most part) is highly focused on data vault modeling. It is documented in the book: Building a Scalable Data Warehouse with Data Vault 2.0.
It is necessary to evolve the specification to include the new components, along with the best practices in order to keep the EDW and BI systems current with the needs and desires of today's businesses.
=== History ===
Data vault modeling was originally conceived by Dan Linstedt in the 1990s and was released in 2000 as a public domain modeling method. In a series of five articles in The Data Administration Newsletter the basic rules of the Data Vault method are expanded and explained. These contain a general overview, an overview of the components, a discussion about end dates and joins, link tables, and an article on loading practices.
An alternative (and seldom used) name for the method is "Common Foundational Integration Modelling Architecture."
Data Vault 2.0 has arrived on the scene as of 2013 and brings to the table Big Data, NoSQL, unstructured, semi-structured seamless integration, along with methodology, architecture, and implementation best practices.
=== Alternative interpretations ===
According to Dan Linstedt, the Data Model is inspired by (or patterned off) a simplistic view of neurons, dendrites, and synapses – where neurons are associated with Hubs and Hub Satellites, Links are dendrites (vectors of information), and other Links are synapses (vectors in the opposite direction). By using a data mining set of algorithms, links can be scored with confidence and strength ratings. They can be created and dropped on the fly in accordance with learning about relationships that currently don't exist. The model can be automatically morphed, adapted, and adjusted as it is used and fed new structures.
Another view is that a data vault model provides an ontology of the Enterprise in the sense that it describes the terms in the domain of the enterprise (Hubs) and the relationships among them (Links), adding descriptive attributes (Satellites) where necessary.
Another way to think of a data vault model is as a graphical model. The data vault model actually provides a "graph based" model with hubs and relationships in a relational database world. In this manner, the developer can use SQL to get at graph-based relationships with sub-second responses.
== Basic notions ==
Data vault attempts to solve the problem of dealing with change in the environment by separating the business keys (that do not mutate as often, because they uniquely identify a business entity) and the associations between those business keys, from the descriptive attributes of those keys.
The business keys and their associations are structural attributes, forming the skeleton of the data model. The data vault method has as one of its main axioms that real business keys only change when the business changes and are therefore the most stable elements from which to derive the structure of a historical database. If you use these keys as the backbone of a data warehouse, you can organize the rest of the data around them. This means that choosing the correct keys for the hubs is of prime importance for the stability of your model. The keys are stored in tables with a few constraints on the structure. These key-tables are called hubs.
=== Hubs ===
Hubs contain a list of unique business keys with low propensity to change. Hubs also contain a surrogate key for each Hub item and metadata describing the origin of the business key. The descriptive attributes for the information on the Hub (such as the description for the key, possibly in multiple languages) are stored in structures called Satellite tables which will be discussed below.
The Hub contains at least the following fields:
a surrogate key, used to connect the other structures to this table.
a business key, the driver for this hub. The business key can consist of multiple fields.
the record source, which can be used to see what system loaded each business key first.
optionally, you can also have metadata fields with information about manual updates (user/time) and the extraction date.
A hub is not allowed to contain multiple business keys, except when two systems deliver the same business key but with collisions that have different meanings.
Hubs should normally have at least one satellite.
==== Hub example ====
This is an example for a hub-table containing cars, called "Car" (H_CAR). The driving key is vehicle identification number.
=== Links ===
Associations or transactions between business keys (relating for instance the hubs for customer and product with each other through the purchase transaction) are modeled using link tables. These tables are basically many-to-many join tables, with some metadata.
Links can link to other links, to deal with changes in granularity (for instance, adding a new key to a database table would change the grain of the database table). For instance, if you have an association between customer and address, you could add a reference to a link between the hubs for product and transport company. This could be a link called "Delivery". Referencing a link in another link is considered a bad practice, because it introduces dependencies between links that make parallel loading more difficult. Since a link to another link is the same as a new link with the hubs from the other link, in these cases creating the links without referencing other links is the preferred solution (see the section on loading practices for more information).
Links sometimes link hubs to information that is not by itself enough to construct a hub. This occurs when one of the business keys associated by the link is not a real business key. As an example, take an order form with "order number" as key, and order lines that are keyed with a semi-random number to make them unique. Let's say, "unique number". The latter key is not a real business key, so it is no hub. However, we do need to use it in order to guarantee the correct granularity for the link. In this case, we do not use a hub with surrogate key, but add the business key "unique number" itself to the link. This is done only when there is no possibility of ever using the business key for another link or as key for attributes in a satellite. This construct has been called a 'peg-legged link' by Dan Linstedt on his (now defunct) forum.
Links contain the surrogate keys for the hubs that are linked, their own surrogate key for the link and metadata describing the origin of the association. The descriptive attributes for the information on the association (such as the time, price or amount) are stored in structures called satellite tables which are discussed below.
==== Link example ====
This is an example for a link-table between two hubs for cars (H_CAR) and persons (H_PERSON). The link is called "Driver" (L_DRIVER).
=== Satellites ===
The hubs and links form the structure of the model, but have no temporal attributes and hold no descriptive attributes. These are stored in separate tables called satellites. These consist of metadata linking them to their parent hub or link, metadata describing the origin of the association and attributes, as well as a timeline with start and end dates for the attribute. Where the hubs and links provide the structure of the model, the satellites provide the "meat" of the model, the context for the business processes that are captured in hubs and links. These attributes are stored both with regards to the details of the matter as well as the timeline and can range from quite complex (all of the fields describing a client's complete profile) to quite simple (a satellite on a link with only a valid-indicator and a timeline).
Usually the attributes are grouped in satellites by source system. However, descriptive attributes such as size, cost, speed, amount or color can change at different rates, so you can also split these attributes up in different satellites based on their rate of change.
All the tables contain metadata, minimally describing at least the source system and the date on which this entry became valid, giving a complete historical view of the data as it enters the data warehouse.
An effectivity satellite is a satellite built on a link, "and record[s] the time period when the corresponding link records start and end effectivity".
==== Satellite example ====
This is an example for a satellite on the drivers-link between the hubs for cars and persons, called "Driver insurance" (S_DRIVER_INSURANCE). This satellite contains attributes that are specific to the insurance of the relationship between the car and the person driving it, for instance an indicator whether this is the primary driver, the name of the insurance company for this car and person (could also be a separate hub) and a summary of the number of accidents involving this combination of vehicle and driver. Also included is a reference to a lookup- or reference table called R_RISK_CATEGORY containing the codes for the risk category in which this relationship is deemed to fall.
(*) at least one attribute is mandatory.
(**) sequence number becomes mandatory if it is needed to enforce uniqueness for multiple valid satellites on the same hub or link.
=== Reference tables ===
Reference tables are a normal part of a healthy data vault model. They are there to prevent redundant storage of simple reference data that is referenced a lot. More formally, Dan Linstedt defines reference data as follows:
Any information deemed necessary to resolve descriptions from codes, or to translate keys in to (sic) a consistent manner. Many of these fields are "descriptive" in nature and describe a specific state of the other more important information. As such, reference data lives in separate tables from the raw Data Vault tables.
Reference tables are referenced from Satellites, but never bound with physical foreign keys. There is no prescribed structure for reference tables: use what works best in your specific case, ranging from simple lookup tables to small data vaults or even stars. They can be historical or have no history, but it is recommended that you stick to the natural keys and not create surrogate keys in that case. Normally, data vaults have a lot of reference tables, just like any other Data Warehouse.
==== Reference example ====
This is an example of a reference table with risk categories for drivers of vehicles. It can be referenced from any satellite in the data vault. For now we reference it from satellite S_DRIVER_INSURANCE. The reference table is R_RISK_CATEGORY.
(*) at least one attribute is mandatory.
== Loading practices ==
The ETL for updating a data vault model is fairly straightforward (see Data Vault Series 5 – Loading Practices). First you have to load all the hubs, creating surrogate IDs for any new business keys. Having done that, you can now resolve all business keys to surrogate ID's if you query the hub. The second step is to resolve the links between hubs and create surrogate IDs for any new associations. At the same time, you can also create all satellites that are attached to hubs, since you can resolve the key to a surrogate ID. Once you have created all the new links with their surrogate keys, you can add the satellites to all the links.
Since the hubs are not joined to each other except through links, you can load all the hubs in parallel. Since links are not attached directly to each other, you can load all the links in parallel as well. Since satellites can be attached only to hubs and links, you can also load these in parallel.
The ETL is quite straightforward and lends itself to easy automation or templating. Problems occur only with links relating to other links, because resolving the business keys in the link only leads to another link that has to be resolved as well. Due to the equivalence of this situation with a link to multiple hubs, this difficulty can be avoided by remodeling such cases and this is in fact the recommended practice.
Data is never deleted from the data vault, unless you have a technical error while loading data.
== Data vault and dimensional modelling ==
The data vault modelled layer is normally used to store data. It is not optimised for query performance, nor is it easy to query by the well-known query-tools such as Cognos, Oracle Business Intelligence Suite Enterprise Edition, SAP Business Objects, Pentaho et al. Since these end-user computing tools expect or prefer their data to be contained in a dimensional model, a conversion is usually necessary.
For this purpose, the hubs and related satellites on those hubs can be considered as dimensions and the links and related satellites on those links can be viewed as fact tables in a dimensional model. This enables you to quickly prototype a dimensional model out of a data vault model using views.
Note that while it is relatively straightforward to move data from a data vault model to a (cleansed) dimensional model, the reverse is not as easy, given the denormalized nature of the dimensional model's fact tables, fundamentally different to the third normal form of the data vault.
== Methodology ==
The data vault methodology is based on SEI/CMMI Level 5 best practices. It includes multiple components of CMMI Level 5, and combines them with best practices from Six Sigma, total quality management (TQM), and SDLC. Particularly, it is focused on Scott Ambler's agile methodology for build out and deployment. Data vault projects have a short, scope-controlled release cycle and should consist of a production release every 2 to 3 weeks.
Teams using the data vault methodology should readily adapt to the repeatable, consistent, and measurable projects that are expected at CMMI Level 5. Data that flow through the EDW data vault system will begin to follow the TQM life-cycle that has long been missing from BI (business intelligence) projects.
== Tools ==
Some examples of tools are:
DataVault4dbt
2150 Datavault Builder
Astera DW Builder
Wherescape
Vaultspeed
AutomateDV
== See also ==
Bill Inmon – American computer scientist
Data lake – Repository of data stored in a raw format
Data warehouse – Centralized storage of knowledge
The Kimball lifecycle – Methodology for developing data warehousesPages displaying short descriptions of redirect targets, developed by Ralph Kimball – American computer scientist
Staging area – Location where items are gathered before use
Agile Business Intelligence – Use of agile software development for business intelligence projectsPages displaying short descriptions of redirect targets
== References ==
=== Citations ===
=== Sources ===
== Literature ==
Patrick Cuba: The Data Vault Guru. A Pragmatic Guide on Building a Data Vault. Selbstverlag, ohne Ort 2020, ISBN 979-86-9130808-6.
John Giles: The Elephant in the Fridge. Guided Steps to Data Vault Success through Building Business-Centered Models. Technics, Basking Ridge 2019, ISBN 978-1-63462-489-3.
Kent Graziano: Better Data Modeling. An Introduction to Agile Data Engineering Using Data Vault 2.0. Data Warrior, Houston 2015.
Hans Hultgren: Modeling the Agile Data Warehouse with Data Vault. Brighton Hamilton, Denver u. a. 2012, ISBN 978-0-615-72308-2.
Dirk Lerner: Data Vault für agile Data-Warehouse-Architekturen. In: Stephan Trahasch, Michael Zimmer (Hrsg.): Agile Business Intelligence. Theorie und Praxis. dpunkt.verlag, Heidelberg 2016, ISBN 978-3-86490-312-0, S. 83–98.
Daniel Linstedt: Super Charge Your Data Warehouse. Invaluable Data Modeling Rules to Implement Your Data Vault. Linstedt, Saint Albans, Vermont 2011, ISBN 978-1-4637-7868-2.
Daniel Linstedt, Michael Olschimke: Building a Scalable Data Warehouse with Data Vault 2.0. Morgan Kaufmann, Waltham, Massachusetts 2016, ISBN 978-0-12-802510-9.
Dani Schnider, Claus Jordan u. a.: Data Warehouse Blueprints. Business Intelligence in der Praxis. Hanser, München 2016, ISBN 978-3-446-45075-2, S. 35–37, 161–173.
== External links ==
The homepage of Dan Linstedt, the inventor of Data Vault modeling | Wikipedia/Data_Vault_Modeling |
Metadata modeling is a type of metamodeling used in software engineering and systems engineering for the analysis and construction of models applicable to and useful for some predefined class of problems.
Meta-modeling is the analysis, construction and development of the frames, rules, constraints, models and theories applicable and useful for the modeling in a predefined class of problems.
The meta-data side of the diagram consists of a concept diagram. This is basically an adjusted class diagram as described in Booch, Rumbaugh and Jacobson (1999). Important notions are concept, generalization, association, multiplicity and aggregation.
== Metadatamodeling Concepts ==
First of all, a concept is a simple version of a Unified Modeling Language (UML) class. The class definition is adopted to define a concept, namely: a set of objects that share the same attributes, operations, relations, and semantics.
The following concept types are specified:
STANDARD CONCEPT: a concept that contains no further (sub) concepts. A standard concept is visualized with a rectangle.
COMPLEX CONCEPT: a concept that consists of a collection of (sub) concepts. Complex concepts are divided into:
OPEN CONCEPT: a complex concept whose (sub) concepts are expanded. An open concept is visualized with two white rectangles above each other. (Correction: An open concept is visualized with 2 white rectangles, 1 overlaid over the other, offset to the right, with 3 corners of the rectangle beneath visible. )
CLOSED CONCEPT: a complex concept whose (sub) concepts are not expanded since it is not relevant in the specific context. A closed concept is visualized by a white rectangle above a black rectangle.
In Figure 1 the three concept types that are used in the modeling technique are illustrated. Concepts are always capitalized, not only in the diagram, but also when referring to them outside the diagram.
In Figure 2 all three concept types are exemplified. Part of the process-data diagram of the requirements workflow in the Unified Process is illustrated. The USE CASE MODEL is an open concept and consists of one or more ACTORS and one or more USE CASES. ACTOR is a standard concept, it contains no further sub-concepts. USE CASE, however, is a closed concept. A USE CASE consists of a description, a flow of events, conditions, special requirements, etc. Because in this case it is unnecessary to reveal that information, the USE CASE is illustrated with a closed concept.
=== Generalization ===
Generalization is a way to express a relationship between a general concept and a more specific concept. Also, if necessary, one can indicate whether the groups of concepts that are identified are overlapping or disjoint, complete or incomplete. Generalization is visualized by a solid arrow with an open arrowhead, pointing to the parent, as is illustrated in Figure 3.
In Figure 4 generalization is exemplified by showing the relationships between the different concepts described in the preceding paragraph. STANDARD CONCEPT and COMPLEX CONCEPT are both a specific kind of CONCEPT. Subsequently, a COMPLEX CONCEPT can be specified into an OPEN CONCEPT and a CLOSED CONCEPT.
=== Association ===
An association is a structural relationship that specifies how concepts are connected to another. It can connect two concepts (binary association) or more than two concepts (n-ary association). An association is represented with an undirected solid line. To give a meaning to the association, a name and name direction can be provided. The name is in the form of an active verb and the name direction is represented by a triangle that points in the direction one needs to read. Association with a name and name direction is illustrated in Figure 5.
In Figure 6 (removed) an example of association is illustrated. The example is a fragment of the process-data diagram of the requirements analysis in the Unified Process. Because both concepts are not expanded any further, although several sub concepts exist, the concepts are illustrated as closed concepts. The figure reads as “SURVEY DESCRIPTION describes USE CASE MODEL”.
=== Multiplicity ===
Except name and name direction, an association can have more characteristics. With multiplicity one can state how many objects of a certain concept can be connected across an instance of an association. Multiplicity is visualized by using the following expressions: (1) for exactly one, (0..1) for one or zero, (0..*) for zero or more, (1..*) for one or more, or for example (5) for an exact number. In Figure 7 association with multiplicity is illustrated.
An example of multiplicity is represented in Figure 8. It is the same example as in Figure 6, only the multiplicity values are added. The figure reads as ‘exactly one SURVEY DESCRIPTION describes exactly one USE CASE MODEL’. This implies that a SURVEY DESCRIPTION cannot describe zero or more than one USE CASE MODEL and a USE CASE MODEL cannot be described by zero or more than one SURVEY DESCRIPTIONS.
=== Aggregation ===
A special type of association is aggregation. Aggregation represents the relation between a concept (as a whole) containing other concepts (as parts). It can also be described as a ‘has-a’ relationship. In Figure 9 an aggregation relationship between OPEN CONCEPT and STANDARD CONCEPT is illustrated. An OPEN CONCEPT consists of one or more STANDARD CONCEPTS and a STANDARD CONCEPT is part of zero or more OPEN CONCEPT.
In Figure 10 aggregation is exemplified by a fragment of the requirements capture workflow in UML-Based Web Engineering. A USE CASE MODEL consists of one or more ACTORS and USE CASES.
=== Properties ===
Sometimes the needs exist to assign properties to concepts. Properties are written in lower case, under the concept name, as is illustrated in Figure 11.
In Figure 12 an example of a concept with properties is visualized. The concept FEATURE has four properties, respectively: priority, type, risk and status.
In Table 1 a list presented Each CONCEPT requires a proper definition which is preferably copied from a standard glossary. All CONCEPT names in the text are with capital characters.
Table 1: Concept definition list
== See also ==
Metadata
Metadata standards
Metamodeling
UML
== References ==
== Further reading ==
Grady Booch, James Rumbaugh and Ivar Jacobson (1999). The Unified Modeling Language User Guide. Redwood City, CA: Addison Wesley Longman Publishing Co., Inc.
M. Saeki (2003). Embedding Metrics into Information Systems Development Methods: An Application of Method Engineering Technique. CAiSE 2003, 374–389.
I. Weerd, J. van de, Souer, J. Versendaal and Sjaak Brinkkemper (2005). Situational Requirements Engineering of Web Content Management Implementations. SREP2005. | Wikipedia/Metadata_modeling |
The relational model (RM) is an approach to managing data using a structure and language consistent with first-order predicate logic, first described in 1969 by English computer scientist Edgar F. Codd, where all data are represented in terms of tuples, grouped into relations. A database organized in terms of the relational model is a relational database.
The purpose of the relational model is to provide a declarative method for specifying data and queries: users directly state what information the database contains and what information they want from it, and let the database management system software take care of describing data structures for storing the data and retrieval procedures for answering queries.
Most relational databases use the SQL data definition and query language; these systems implement what can be regarded as an engineering approximation to the relational model. A table in a SQL database schema corresponds to a predicate variable; the contents of a table to a relation; key constraints, other constraints, and SQL queries correspond to predicates. However, SQL databases deviate from the relational model in many details, and Codd fiercely argued against deviations that compromise the original principles.
== History ==
The relational model was developed by Edgar F. Codd as a general model of data, and subsequently promoted by Chris Date and Hugh Darwen among others. In their 1995 The Third Manifesto, Date and Darwen try to demonstrate how the relational model can accommodate certain "desired" object-oriented features.
=== Extensions ===
Some years after publication of his 1970 model, Codd proposed a three-valued logic (True, False, Missing/NULL) version of it to deal with missing information, and in his The Relational Model for Database Management Version 2 (1990) he went a step further with a four-valued logic (True, False, Missing but Applicable, Missing but Inapplicable) version.
== Conceptualization ==
=== Basic concepts ===
A relation consists of a heading and a body. The heading defines a set of attributes, each with a name and data type (sometimes called a domain). The number of attributes in this set is the relation's degree or arity. The body is a set of tuples. A tuple is a collection of n values, where n is the relation's degree, and each value in the tuple corresponds to a unique attribute. The number of tuples in this set is the relation's cardinality.: 17–22
Relations are represented by relational variables or relvars, which can be reassigned.: 22–24 A database is a collection of relvars.: 112–113
In this model, databases follow the Information Principle: At any given time, all information in the database is represented solely by values within tuples, corresponding to attributes, in relations identified by relvars.: 111
=== Constraints ===
A database may define arbitrary boolean expressions as constraints. If all constraints evaluate as true, the database is consistent; otherwise, it is inconsistent. If a change to a database's relvars would leave the database in an inconsistent state, that change is illegal and must not succeed.: 91
In general, constraints are expressed using relational comparison operators, of which just one, "is subset of" (⊆), is theoretically sufficient.
Two special cases of constraints are expressed as keys and foreign keys:
==== Keys ====
A candidate key, or simply a key, is the smallest subset of attributes guaranteed to uniquely differentiate each tuple in a relation. Since each tuple in a relation must be unique, every relation necessarily has a key, which may be its complete set of attributes. A relation may have multiple keys, as there may be multiple ways to uniquely differentiate each tuple.: 31–33
An attribute may be unique across tuples without being a key. For example, a relation describing a company's employees may have two attributes: ID and Name. Even if no employees currently share a name, if it is possible to eventually hire a new employee with the same name as a current employee, the attribute subset {Name} is not a key. Conversely, if the subset {ID} is a key, this means not only that no employees currently share an ID, but that no employees will ever share an ID.: 31–33
==== Foreign keys ====
A foreign key is a subset of attributes A in a relation R1 that corresponds with a key of another relation R2, with the property that the projection of R1 on A is a subset of the projection of R2 on A. In other words, if a tuple in R1 contains values for a foreign key, there must be a corresponding tuple in R2 containing the same values for the corresponding key.: 34
=== Relational operations ===
Users (or programs) request data from a relational database by sending it a query. In response to a query, the database returns a result set.
Often, data from multiple tables are combined into one, by doing a join. Conceptually, this is done by taking all possible combinations of rows (the Cartesian product), and then filtering out everything except the answer.
There are a number of relational operations in addition to join. These include project (the process of eliminating some of the columns), restrict (the process of eliminating some of the rows), union (a way of combining two tables with similar structures), difference (that lists the rows in one table that are not found in the other), intersect (that lists the rows found in both tables), and product (mentioned above, which combines each row of one table with each row of the other). Depending on which other sources you consult, there are a number of other operators – many of which can be defined in terms of those listed above. These include semi-join, outer operators such as outer join and outer union, and various forms of division. Then there are operators to rename columns, and summarizing or aggregating operators, and if you permit relation values as attributes (relation-valued attribute), then operators such as group and ungroup.
The flexibility of relational databases allows programmers to write queries that were not anticipated by the database designers. As a result, relational databases can be used by multiple applications in ways the original designers did not foresee, which is especially important for databases that might be used for a long time (perhaps several decades). This has made the idea and implementation of relational databases very popular with businesses.
=== Database normalization ===
Relations are classified based upon the types of anomalies to which they're vulnerable. A database that is in the first normal form is vulnerable to all types of anomalies, while a database that is in the domain/key normal form has no modification anomalies. Normal forms are hierarchical in nature. That is, the lowest level is the first normal form, and the database cannot meet the requirements for higher level normal forms without first having met all the requirements of the lesser normal forms.
== Logical interpretation ==
The relational model is a formal system. A relation's attributes define a set of logical propositions. Each proposition can be expressed as a tuple. The body of a relation is a subset of these tuples, representing which propositions are true. Constraints represent additional propositions which must also be true. Relational algebra is a set of logical rules that can validly infer conclusions from these propositions.: 95–101
The definition of a tuple allows for a unique empty tuple with no values, corresponding to the empty set of attributes. If a relation has a degree of 0 (i.e. its heading contains no attributes), it may have either a cardinality of 0 (a body containing no tuples) or a cardinality of 1 (a body containing the single empty tuple). These relations represent Boolean truth values. The relation with degree 0 and cardinality 0 is False, while the relation with degree 0 and cardinality 1 is True.: 221–223
=== Example ===
If a relation of Employees contains the attributes {Name, ID}, then the tuple {Alice, 1} represents the proposition: "There exists an employee named Alice with ID 1". This proposition may be true or false. If this tuple exists in the relation's body, the proposition is true (there is such an employee). If this tuple is not in the relation's body, the proposition is false (there is no such employee).: 96–97
Furthermore, if {ID} is a key, then a relation containing the tuples {Alice, 1} and {Bob, 1} would represent the following contradiction:
There exists an employee with the name Alice and the ID 1.
There exists an employee with the name Bob and the ID 1.
There do not exist multiple employees with the same ID.
Under the principle of explosion, this contradiction would allow the system to prove that any arbitrary proposition is true. The database must enforce the key constraint to prevent this.: 104
== Examples ==
=== Database ===
An idealized, very simple example of a description of some relvars (relation variables) and their attributes:
Customer (Customer ID, Name)
Order (Order ID, Customer ID, Invoice ID, Date)
Invoice (Invoice ID, Customer ID, Order ID, Status)
In this design we have three relvars: Customer, Order, and Invoice. The bold, underlined attributes are candidate keys. The non-bold, underlined attributes are foreign keys.
Usually one candidate key is chosen to be called the primary key and used in preference over the other candidate keys, which are then called alternate keys.
A candidate key is a unique identifier enforcing that no tuple will be duplicated; this would make the relation into something else, namely a bag, by violating the basic definition of a set. Both foreign keys and superkeys (that includes candidate keys) can be composite, that is, can be composed of several attributes. Below is a tabular depiction of a relation of our example Customer relvar; a relation can be thought of as a value that can be attributed to a relvar.
=== Customer relation ===
If we attempted to insert a new customer with the ID 123, this would violate the design of the relvar since Customer ID is a primary key and we already have a customer 123. The DBMS must reject a transaction such as this that would render the database inconsistent by a violation of an integrity constraint. However, it is possible to insert another customer named Alice, as long as this new customer has a unique ID, since the Name field is not part of the primary key.
Foreign keys are integrity constraints enforcing that the value of the attribute set is drawn from a candidate key in another relation. For example, in the Order relation the attribute Customer ID is a foreign key. A join is the operation that draws on information from several relations at once. By joining relvars from the example above we could query the database for all of the Customers, Orders, and Invoices. If we only wanted the tuples for a specific customer, we would specify this using a restriction condition. If we wanted to retrieve all of the Orders for Customer 123, we could query the database to return every row in the Order table with Customer ID 123 .
There is a flaw in our database design above. The Invoice relvar contains an Order ID attribute. So, each tuple in the Invoice relvar will have one Order ID, which implies that there is precisely one Order for each Invoice. But in reality an invoice can be created against many orders, or indeed for no particular order. Additionally the Order relvar contains an Invoice ID attribute, implying that each Order has a corresponding Invoice. But again this is not always true in the real world. An order is sometimes paid through several invoices, and sometimes paid without an invoice. In other words, there can be many Invoices per Order and many Orders per Invoice. This is a many-to-many relationship between Order and Invoice (also called a non-specific relationship). To represent this relationship in the database a new relvar should be introduced whose role is to specify the correspondence between Orders and Invoices:
OrderInvoice (Order ID, Invoice ID)
Now, the Order relvar has a one-to-many relationship to the OrderInvoice table, as does the Invoice relvar. If we want to retrieve every Invoice for a particular Order, we can query for all orders where Order ID in the Order relation equals the Order ID in OrderInvoice, and where Invoice ID in OrderInvoice equals the Invoice ID in Invoice.
== Application to relational databases ==
A data type in a relational database might be the set of integers, the set of character strings, the set of dates, etc. The relational model does not dictate what types are to be supported.
Attributes are commonly represented as columns, tuples as rows, and relations as tables. A table is specified as a list of column definitions, each of which specifies a unique column name and the type of the values that are permitted for that column. An attribute value is the entry in a specific column and row.
A database relvar (relation variable) is commonly known as a base table. The heading of its assigned value at any time is as specified in the table declaration and its body is that most recently assigned to it by an update operator (typically, INSERT, UPDATE, or DELETE). The heading and body of the table resulting from evaluating a query are determined by the definitions of the operators used in that query.
=== SQL and the relational model ===
SQL, initially pushed as the standard language for relational databases, deviates from the relational model in several places. The current ISO SQL standard doesn't mention the relational model or use relational terms or concepts.
According to the relational model, a Relation's attributes and tuples are mathematical sets, meaning they are unordered and unique. In a SQL table, neither rows nor columns are proper sets. A table may contain both duplicate rows and duplicate columns, and a table's columns are explicitly ordered. SQL uses a Null value to indicate missing data, which has no analog in the relational model. Because a row can represent unknown information, SQL does not adhere to the relational model's Information Principle.: 153–155, 162
== Set-theoretic formulation ==
Basic notions in the relational model are relation names and attribute names. We will represent these as strings such as "Person" and "name" and we will usually use the variables
r
,
s
,
t
,
…
{\displaystyle r,s,t,\ldots }
and
a
,
b
,
c
{\displaystyle a,b,c}
to range over them. Another basic notion is the set of atomic values that contains values such as numbers and strings.
Our first definition concerns the notion of tuple, which formalizes the notion of row or record in a table:
Tuple
A tuple is a partial function from attribute names to atomic values.
Header
A header is a finite set of attribute names.
Projection
The projection of a tuple
t
{\displaystyle t}
on a finite set of attributes
A
{\displaystyle A}
is
t
[
A
]
=
{
(
a
,
v
)
:
(
a
,
v
)
∈
t
,
a
∈
A
}
{\displaystyle t[A]=\{(a,v):(a,v)\in t,a\in A\}}
.
The next definition defines relation that formalizes the contents of a table as it is defined in the relational model.
Relation
A relation is a tuple
(
H
,
B
)
{\displaystyle (H,B)}
with
H
{\displaystyle H}
, the header, and
B
{\displaystyle B}
, the body, a set of tuples that all have the domain
H
{\displaystyle H}
.
Such a relation closely corresponds to what is usually called the extension of a predicate in first-order logic except that here we identify the places in the predicate with attribute names. Usually in the relational model a database schema is said to consist of a set of relation names, the headers that are associated with these names and the constraints that should hold for every instance of the database schema.
Relation universe
A relation universe
U
{\displaystyle U}
over a header
H
{\displaystyle H}
is a non-empty set of relations with header
H
{\displaystyle H}
.
Relation schema
A relation schema
(
H
,
C
)
{\displaystyle (H,C)}
consists of a header
H
{\displaystyle H}
and a predicate
C
(
R
)
{\displaystyle C(R)}
that is defined for all relations
R
{\displaystyle R}
with header
H
{\displaystyle H}
. A relation satisfies a relation schema
(
H
,
C
)
{\displaystyle (H,C)}
if it has header
H
{\displaystyle H}
and satisfies
C
{\displaystyle C}
.
=== Key constraints and functional dependencies ===
One of the simplest and most important types of relation constraints is the key constraint. It tells us that in every instance of a certain relational schema the tuples can be identified by their values for certain attributes.
Superkey
A superkey is a set of column headers for which the values of those columns concatenated are unique across all rows. Formally:
A superkey is written as a finite set of attribute names.
A superkey
K
{\displaystyle K}
holds in a relation
(
H
,
B
)
{\displaystyle (H,B)}
if:
K
⊆
H
{\displaystyle K\subseteq H}
and
there exist no two distinct tuples
t
1
,
t
2
∈
B
{\displaystyle t_{1},t_{2}\in B}
such that
t
1
[
K
]
=
t
2
[
K
]
{\displaystyle t_{1}[K]=t_{2}[K]}
.
A superkey holds in a relation universe
U
{\displaystyle U}
if it holds in all relations in
U
{\displaystyle U}
.
Theorem: A superkey
K
{\displaystyle K}
holds in a relation universe
U
{\displaystyle U}
over
H
{\displaystyle H}
if and only if
K
⊆
H
{\displaystyle K\subseteq H}
and
K
→
H
{\displaystyle K\rightarrow H}
holds in
U
{\displaystyle U}
.
Candidate key
A candidate key is a superkey that cannot be further subdivided to form another superkey.
A superkey
K
{\displaystyle K}
holds as a candidate key for a relation universe
U
{\displaystyle U}
if it holds as a superkey for
U
{\displaystyle U}
and there is no proper subset of
K
{\displaystyle K}
that also holds as a superkey for
U
{\displaystyle U}
.
Functional dependency
Functional dependency is the property that a value in a tuple may be derived from another value in that tuple.
A functional dependency (FD for short) is written as
X
→
Y
{\displaystyle X\rightarrow Y}
for
X
,
Y
{\displaystyle X,Y}
finite sets of attribute names.
A functional dependency
X
→
Y
{\displaystyle X\rightarrow Y}
holds in a relation
(
H
,
B
)
{\displaystyle (H,B)}
if:
X
,
Y
⊆
H
{\displaystyle X,Y\subseteq H}
and
∀
{\displaystyle \forall }
tuples
t
1
,
t
2
∈
B
{\displaystyle t_{1},t_{2}\in B}
,
t
1
[
X
]
=
t
2
[
X
]
⇒
t
1
[
Y
]
=
t
2
[
Y
]
{\displaystyle t_{1}[X]=t_{2}[X]~\Rightarrow ~t_{1}[Y]=t_{2}[Y]}
A functional dependency
X
→
Y
{\displaystyle X\rightarrow Y}
holds in a relation universe
U
{\displaystyle U}
if it holds in all relations in
U
{\displaystyle U}
.
Trivial functional dependency
A functional dependency is trivial under a header
H
{\displaystyle H}
if it holds in all relation universes over
H
{\displaystyle H}
.
Theorem: An FD
X
→
Y
{\displaystyle X\rightarrow Y}
is trivial under a header
H
{\displaystyle H}
if and only if
Y
⊆
X
⊆
H
{\displaystyle Y\subseteq X\subseteq H}
.
Closure
Armstrong's axioms: The closure of a set of FDs
S
{\displaystyle S}
under a header
H
{\displaystyle H}
, written as
S
+
{\displaystyle S^{+}}
, is the smallest superset of
S
{\displaystyle S}
such that:
Y
⊆
X
⊆
H
⇒
X
→
Y
∈
S
+
{\displaystyle Y\subseteq X\subseteq H~\Rightarrow ~X\rightarrow Y\in S^{+}}
(reflexivity)
X
→
Y
∈
S
+
∧
Y
→
Z
∈
S
+
⇒
X
→
Z
∈
S
+
{\displaystyle X\rightarrow Y\in S^{+}\land Y\rightarrow Z\in S^{+}~\Rightarrow ~X\rightarrow Z\in S^{+}}
(transitivity) and
X
→
Y
∈
S
+
∧
Z
⊆
H
⇒
(
X
∪
Z
)
→
(
Y
∪
Z
)
∈
S
+
{\displaystyle X\rightarrow Y\in S^{+}\land Z\subseteq H~\Rightarrow ~(X\cup Z)\rightarrow (Y\cup Z)\in S^{+}}
(augmentation)
Theorem: Armstrong's axioms are sound and complete; given a header
H
{\displaystyle H}
and a set
S
{\displaystyle S}
of FDs that only contain subsets of
H
{\displaystyle H}
,
X
→
Y
∈
S
+
{\displaystyle X\rightarrow Y\in S^{+}}
if and only if
X
→
Y
{\displaystyle X\rightarrow Y}
holds in all relation universes over
H
{\displaystyle H}
in which all FDs in
S
{\displaystyle S}
hold.
Completion
The completion of a finite set of attributes
X
{\displaystyle X}
under a finite set of FDs
S
{\displaystyle S}
, written as
X
+
{\displaystyle X^{+}}
, is the smallest superset of
X
{\displaystyle X}
such that:
Y
→
Z
∈
S
∧
Y
⊆
X
+
⇒
Z
⊆
X
+
{\displaystyle Y\rightarrow Z\in S\land Y\subseteq X^{+}~\Rightarrow ~Z\subseteq X^{+}}
The completion of an attribute set can be used to compute if a certain dependency is in the closure of a set of FDs.
Theorem: Given a set
S
{\displaystyle S}
of FDs,
X
→
Y
∈
S
+
{\displaystyle X\rightarrow Y\in S^{+}}
if and only if
Y
⊆
X
+
{\displaystyle Y\subseteq X^{+}}
.
Irreducible cover
An irreducible cover of a set
S
{\displaystyle S}
of FDs is a set
T
{\displaystyle T}
of FDs such that:
S
+
=
T
+
{\displaystyle S^{+}=T^{+}}
there exists no
U
⊂
T
{\displaystyle U\subset T}
such that
S
+
=
U
+
{\displaystyle S^{+}=U^{+}}
X
→
Y
∈
T
⇒
Y
{\displaystyle X\rightarrow Y\in T~\Rightarrow Y}
is a singleton set and
X
→
Y
∈
T
∧
Z
⊂
X
⇒
Z
→
Y
∉
S
+
{\displaystyle X\rightarrow Y\in T\land Z\subset X~\Rightarrow ~Z\rightarrow Y\notin S^{+}}
.
=== Algorithm to derive candidate keys from functional dependencies ===
algorithm derive candidate keys from functional dependencies is
input: a set S of FDs that contain only subsets of a header H
output: the set C of superkeys that hold as candidate keys in
all relation universes over H in which all FDs in S hold
C := ∅ // found candidate keys
Q := { H } // superkeys that contain candidate keys
while Q <> ∅ do
let K be some element from Q
Q := Q – { K }
minimal := true
for each X->Y in S do
K' := (K – Y) ∪ X // derive new superkey
if K' ⊂ K then
minimal := false
Q := Q ∪ { K' }
end if
end for
if minimal and there is not a subset of K in C then
remove all supersets of K from C
C := C ∪ { K }
end if
end while
== Alternatives ==
Other models include the hierarchical model and network model. Some systems using these older architectures are still in use today in data centers with high data volume needs, or where existing systems are so complex and abstract that it would be cost-prohibitive to migrate to systems employing the relational model. Also of note are newer object-oriented databases. and Datalog.
Datalog is a database definition language, which combines a relational view of data, as in the relational model, with a logical view, as in logic programming. Whereas relational databases use a relational calculus or relational algebra, with relational operations, such as union, intersection, set difference and cartesian product to specify queries, Datalog uses logical connectives, such as if, or, and and not to define relations as part of the database itself.
In contrast with the relational model, which cannot express recursive queries without introducing a least-fixed-point operator, recursive relations can be defined in Datalog, without introducing any new logical connectives or operators.
== See also ==
== Notes ==
== References ==
== Further reading ==
Date, Christopher J.; Darwen, Hugh (2000). Foundation for future database systems: the third manifesto; a detailed study of the impact of type theory on the relational model of data, including a comprehensive model of type inheritance (2 ed.). Reading, MA: Addison-Wesley. ISBN 978-0-201-70928-5.
——— (2007). An Introduction to Database Systems (8 ed.). Boston: Pearson Education. ISBN 978-0-321-19784-9.
== External links ==
Childs (1968), Feasibility of a set-theoretic data structure: a general structure based on a reconstituted definition of relation (research), Handle, hdl:2027.42/4164 cited in Codd's 1970 paper.
Darwen, Hugh, The Third Manifesto (TTM).
"Relational Model", C2.
Binary relations and tuples compared with respect to the semantic web (World Wide Web log), Sun. | Wikipedia/Relational_Model |
Enterprise data modelling or enterprise data modeling (EDM) is the practice of creating a graphical model of the data used by an enterprise or company. Typical outputs of this activity include an enterprise data model consisting of entity–relationship diagrams (ERDs), XML schemas (XSD), and an enterprise wide data dictionary.
== Overview ==
Producing such a model allows for a business to get a 'helicopter' view of their enterprise. In EAI (enterprise application integration) an EDM allows data to be represented in a single idiom, enabling the use of a common syntax for the XML of services or operations and the physical data model for database schema creation. Data modeling tools for ERDs that also allow the user to create a data dictionary are usually used to aid in the development of an EDM.
The implementation of an EDM is closely related to the issues of data governance and data stewardship within an organization.
An Enterprise Data Model (EDM) represents a single integrated definition of data, unbiased of any system or application. It is independent of “how” the data is physically sourced, stored, processed or accessed. The model unites, formalizes and represents the things important to an organization, as well as the rules governing them
== References ==
Noreen Kendle (July 1, 2005). "The Enterprise Data Model". The Data Administration Newsletter.
Andy Graham (2010). The Enterprise Data Model: A framework for enterprise data architecture. ISBN 978-0956582904. | Wikipedia/Enterprise_data_modelling |
Enterprise modelling is the abstract representation, description and definition of the structure, processes, information and resources of an identifiable business, government body, or other large organization.
It deals with the process of understanding an organization and improving its performance through creation and analysis of enterprise models. This includes the modelling of the relevant business domain (usually relatively stable), business processes (usually more volatile), and uses of information technology within the business domain and its processes.
== Overview ==
Enterprise modelling is the process of building models of whole or part of an enterprise with process models, data models, resource models and/or new ontologies etc. It is based on knowledge about the enterprise, previous models and/or reference models as well as domain ontologies using model representation languages. An enterprise in general is a unit of economic organization or activity. These activities are required to develop and deliver products and/or services to a customer. An enterprise includes a number of functions and operations such as purchasing, manufacturing, marketing, finance, engineering, and research and development. The enterprise of interest are those corporate functions and operations necessary to manufacture current and potential future variants of a product.
The term "enterprise model" is used in industry to represent differing enterprise representations, with no real standardized definition. Due to the complexity of enterprise organizations, a vast number of differing enterprise modelling approaches have been pursued across industry and academia. Enterprise modelling constructs can focus upon manufacturing operations and/or business operations; however, a common thread in enterprise modelling is an inclusion of assessment of information technology. For example, the use of networked computers to trigger and receive replacement orders along a material supply chain is an example of how information technology is used to coordinate manufacturing operations within an enterprise.
The basic idea of enterprise modelling according to Ulrich Frank is "to offer different views on an enterprise, thereby providing a medium to foster dialogues between various stakeholders - both in academia and in practice. For this purpose they include abstractions suitable for strategic planning, organisational (re-) design and software engineering. The views should complement each other and thereby foster a better understanding of complex systems by systematic abstractions. The views should be generic in the sense that they can be applied to any enterprise. At the same time they should offer abstractions that help with designing information systems which are well integrated with a company's long term strategy and its organisation. Hence, enterprise models can be regarded as the conceptual infrastructure that support a high level of integration."
== History ==
Enterprise modelling has its roots in systems modelling and especially information systems modelling. One of the earliest pioneering works in modelling information systems was done by Young and Kent (1958), who argued for "a precise and abstract way of specifying the informational and time characteristics of a data processing problem". They wanted to create "a notation that should enable the analyst to organize the problem around any piece of hardware". Their work was a first effort to create an abstract specification and invariant basis for designing different alternative implementations using different hardware components. A next step in IS modelling was taken by CODASYL, an IT industry consortium formed in 1959, who essentially aimed at the same thing as Young and Kent: the development of "a proper structure for machine independent problem definition language, at the system level of data processing". This led to the development of a specific IS information algebra.
The first methods dealing with enterprise modelling emerged in the 1970s. They were the entity-relationship approach of Peter Chen (1976) and SADT of Douglas T. Ross (1977), the one concentrate on the information view and the other on the function view of business entities. These first methods have been followed end 1970s by numerous methods for software engineering, such as SSADM, Structured Design, Structured Analysis and others. Specific methods for enterprise modelling in the context of Computer Integrated Manufacturing appeared in the early 1980s. They include the IDEF family of methods (ICAM, 1981) and the GRAI method by Guy Doumeingts in 1984 followed by GRAI/GIM by Doumeingts and others in 1992.
These second generation of methods were activity-based methods which have been surpassed on the one hand by process-centred modelling methods developed in the 1990s such as Architecture of Integrated Information Systems (ARIS), CIMOSA and Integrated Enterprise Modeling (IEM). And on the other hand by object-oriented methods, such as Object-oriented analysis (OOA) and Object-modelling technique (OMT).
== Enterprise modelling basics ==
=== Enterprise model ===
An enterprise model is a representation of the structure, activities, processes, information, resources, people, behavior, goals, and constraints of a business, government, or other enterprises. Thomas Naylor (1970) defined a (simulation) model as "an attempt to describe the interrelationships among a corporation's financial, marketing, and production activities in terms of a set of mathematical and logical relationships which are programmed into the computer." These interrelationships should according to Gershefski (1971) represent in detail all aspects of the firm including "the physical operations of the company, the accounting and financial practices followed, and the response to investment in key areas" Programming the modelled relationships into the computer is not always necessary: enterprise models, under different names, have existed for centuries and were described, for example, by Adam Smith, Walter Bagehot, and many others.
According to Fox and Gruninger (1998) from "a design perspective, an enterprise model should provide the language used to explicitly define an enterprise... From an operations perspective, the enterprise model must be able to represent what is planned, what might happen, and what has happened. It must supply the information and knowledge necessary to support the operations of the enterprise, whether they be performed by hand or machine."
In a two-volume set entitled The Managerial Cybernetics of Organization Stafford Beer introduced a model of the enterprise, the Viable System Model (VSM). Volume 2, The Heart of Enterprise, analyzed the VSM as a recursive organization of five systems: System One (S1) through System Five (S5). Beer's model differs from others in that the VSM is recursive, not hierarchical: "In a recursive organizational structure, any viable system contains, and is contained in, a viable system."
=== Function modelling ===
Function modelling in systems engineering is a structured representation of the functions, activities or processes within the modelled system or subject area.
A function model, also called an activity model or process model, is a graphical representation of an enterprise's function within a defined scope. The purposes of the function model are: to describe the functions and processes, assist with discovery of information needs, help identify opportunities, and establish a basis for determining product and service costs. A function model is created with a functional modelling perspective. A functional perspectives is one or more perspectives possible in process modelling. Other perspectives possible are for example behavioural, organisational or informational.
A functional modelling perspective concentrates on describing the dynamic process. The main concept in this modelling perspective is the process, this could be a function, transformation, activity, action, task etc. A well-known example of a modelling language employing this perspective is data flow diagrams. The perspective uses four symbols to describe a process, these being:
Process: Illustrates transformation from input to output.
Store: Data-collection or some sort of material.
Flow: Movement of data or material in the process.
External Entity: External to the modelled system, but interacts with it.
Now, with these symbols, a process can be represented as a network of these symbols. This decomposed process is a DFD, data flow diagram. In Dynamic Enterprise Modeling, for example, a division is made in the Control model, Function Model, Process model and Organizational model.
=== Data modelling ===
Data modelling is the process of creating a data model by applying formal data model descriptions using data modelling techniques. Data modelling is a technique for defining business requirements for a database. It is sometimes called database modelling because a data model is eventually implemented in a database.
The figure illustrates the way data models are developed and used today. A conceptual data model is developed based on the data requirements for the application that is being developed, perhaps in the context of an activity model. The data model will normally consist of entity types, attributes, relationships, integrity rules, and the definitions of those objects. This is then used as the start point for interface or database design.
=== Business process modelling ===
Business process modelling, not to be confused with the wider Business Process Management (BPM) discipline, is the activity of representing processes of an enterprise, so that the current ("as is") process may be analyzed and improved in future ("to be"). Business process modelling is typically performed by business analysts and managers who are seeking to improve process efficiency and quality. The process improvements identified by business process modelling may or may not require Information Technology involvement, although that is a common driver for the need to model a business process, by creating a process master.
Change management programs are typically involved to put the improved business processes into practice. With advances in technology from large platform vendors, the vision of business process modelling models becoming fully executable (and capable of simulations and round-trip engineering) is coming closer to reality every day.
=== Systems architecture ===
The RM-ODP reference model identifies enterprise modelling as providing one of the five viewpoints of an open distributed system. Note that such a system need not be a modern-day IT system: a banking clearing house in the 19th century may be used as an example ().
== Enterprise modelling techniques ==
There are several techniques for modelling the enterprise such as
Active Knowledge Modeling,
Design & Engineering Methodology for Organizations (DEMO)
Dynamic Enterprise Modeling
Enterprise Modelling Methodology/Open Distributed Processing (EMM/ODP)
Extended Enterprise Modeling Language
Multi-Perspective Enterprise Modelling (MEMO),
Process modelling such as BPMN, CIMOSA, DYA, IDEF3, LOVEM, PERA, etc.
Integrated Enterprise Modeling (IEM), and
Modelling the enterprise with multi-agent systems.
More enterprise modelling techniques are developed into Enterprise Architecture framework such as:
ARIS - ARchitecture of Integrated Information Systems
DoDAF - the US Department of Defense Architecture Framework
RM-ODP - Reference Model of Open Distributed Processing
TOGAF - The Open Group Architecture Framework
Zachman Framework - an architecture framework, based on the work of John Zachman at IBM in the 1980s
Service-oriented modeling framework (SOMF), based on the work of Michael Bell
And metamodelling frameworks such as:
Generalised Enterprise Reference Architecture and Methodology
== Enterprise engineering ==
Enterprise engineering is the discipline concerning the design and the engineering of enterprises, regarding both their business and organization. In theory and practice two types of enterprise engineering has emerged. A more general connected to engineering and the management of enterprises, and a more specific related to software engineering, enterprise modelling and enterprise architecture.
In the field of engineering a more general enterprise engineering emerged, defined as the application of engineering principals to the management of enterprises. It encompasses the application of knowledge, principles, and disciplines related to the analysis, design, implementation and operation of all elements associated with an enterprise. In essence this is an interdisciplinary field which combines systems engineering and strategic management as it seeks to engineer the entire enterprise in terms of the products, processes and business operations. The view is one of continuous improvement and continued adaptation as firms, processes and markets develop along their life cycles. This total systems approach encompasses the traditional areas of research and development, product design, operations and manufacturing as well as information systems and strategic management. This fields is related to engineering management, operations management, service management and systems engineering.
In the context of software development a specific field of enterprise engineering has emerged, which deals with the modelling and integration of various organizational and technical parts of business processes. In the context of information systems development it has been the area of activity in the organization of the systems analysis, and an extension of the scope of Information Modelling. It can also be viewed as the extension and generalization of the systems analysis and systems design phases of the software development process. Here Enterprise modelling can be part of the early, middle and late information system development life cycle. Explicit representation of the organizational and technical system infrastructure is being created in order to understand the orderly transformations of existing work practices. This field is also called Enterprise architecture, or defined with Enterprise Ontology as being two major parts of Enterprise architecture.
== Related fields ==
=== Business reference modelling ===
Business reference modelling is the development of reference models concentrating on the functional and organizational aspects of the core business of an enterprise, service organization or government agency. In enterprise engineering a business reference model is part of an enterprise architecture framework. This framework defines in a series of reference models, how to organize the structure and views associated with an Enterprise Architecture.
A reference model in general is a model of something that embodies the basic goal or idea of something and can then be looked at as a reference for various purposes. A business reference model is a means to describe the business operations of an organization, independent of the organizational structure that perform them. Other types of business reference model can also depict the relationship between the business processes, business functions, and the business area’s business reference model. These reference model can be constructed in layers, and offer a foundation for the analysis of service components, technology, data, and performance.
=== Economic modelling ===
Economic modelling is the theoretical representation of economic processes by a set of variables and a set of logical and/or quantitative relationships between them. The economic model is a simplified framework designed to illustrate complex processes, often but not always using mathematical techniques. Frequently, economic models use structural parameters. Structural parameters are underlying parameters in a model or class of models. A model may have various parameters and those parameters may change to create various properties.
In general terms, economic models have two functions: first as a simplification of and abstraction from observed data, and second as a means of selection of data based on a paradigm of econometric study. The simplification is particularly important for economics given the enormous complexity of economic processes. This complexity can be attributed to the diversity of factors that determine economic activity; these factors include: individual and cooperative decision processes, resource limitations, environmental and geographical constraints, institutional and legal requirements and purely random fluctuations. Economists therefore must make a reasoned choice of which variables and which relationships between these variables are relevant and which ways of analyzing and presenting this information are useful.
=== Ontology engineering ===
Ontology engineering or ontology building is a subfield of knowledge engineering that studies the methods and methodologies for building ontologies. In the domain of enterprise architecture, an ontology is an outline or a schema used to structure objects, their attributes and relationships in a consistent manner. As in enterprise modelling, an ontology can be composed of other ontologies. The purpose of ontologies in enterprise modelling is to formalize and establish the sharability, re-usability, assimilation and dissemination of information across all organizations and departments within an enterprise. Thus, an ontology enables integration of the various functions and processes which take place in an enterprise.
One common language with well articulated structure and vocabulary would enable the company to be more efficient in its operations. A common ontology will allow for effective communication, understanding and thus coordination among the various divisions of an enterprise. There are various kinds of ontologies used in numerous environments. While the language example given earlier dealt with the area of information systems and design, other ontologies may be defined for processes, methods, activities, etc., within an enterprise.
Using ontologies in enterprise modelling offers several advantages. Ontologies ensure clarity, consistency, and structure to a model. They promote efficient model definition and analysis. Generic enterprise ontologies allow for reusability of and automation of components. Because ontologies are schemata or outlines, the use of ontologies does not ensure proper enterprise model definition, analysis, or clarity. Ontologies are limited by how they are defined and implemented. An ontology may or may not include the potential or capability to capture all of the aspects of what is being modelled.
=== Systems thinking ===
The modelling of the enterprise and its environment could facilitate the creation of enhanced understanding of the business domain and processes of the extended enterprise, and especially of the relations—both those that "hold the enterprise together" and those that extend across the boundaries of the enterprise. Since enterprise is a system, concepts used in system thinking can be successfully reused in modelling enterprises.
This way a fast understanding can be achieved throughout the enterprise about how business functions are working and how they depend upon other functions in the organization.
== See also ==
Business process modelling
Enterprise architecture
Enterprise Architecture framework
Enterprise integration
Enterprise life cycle
ISO 19439
Enterprise Data Modeling
== References ==
== Further reading ==
August-Wilhelm Scheer (1992). Architecture of Integrated Information Systems: Foundations of Enterprise Modelling. Springer-Verlag. ISBN 3-540-55131-X
François Vernadat (1996) Enterprise Modeling and Integration: Principles and Applications, Chapman & Hall, London, ISBN 0-412-60550-3
== External links ==
Agile Enterprise Modeling. by S.W. Ambler, 2003-2008.
Enterprise Modeling Anti-patterns. by S.W. Ambler, 2005.
Enterprise Modelling and Information Systems Architectures - An International Journal (EMISA) is a scholarly open access journal with a unique focus on novel and innovative research on Enterprise Models and Information Systems Architectures. | Wikipedia/Enterprise_modeling |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.