id
stringlengths
14
20
title
stringlengths
4
181
text
stringlengths
1
43k
source
stringclasses
1 value
wiki_11_chunk_66
Artificial intelligence
Philosopher John Searle characterized this position as "strong AI": "The appropriately programmed computer with the right inputs and outputs would thereby have a mind in exactly the same sense human beings have minds." Searle counters this assertion with his Chinese room argument, which attempts to show that, even if a machine perfectly simulates human behavior, there is still no reason to suppose it also has a mind. Robot rights
wikipedia
wiki_11_chunk_67
Artificial intelligence
If a machine has a mind and subjective experience, then it may also have sentience (the ability to feel), and if so, then it could also suffer, and thus it would be entitled to certain rights. Any hypothetical robot rights would lie on a spectrum with animal rights and human rights. This issue has been considered in fiction for centuries, and is now being considered by, for example, California's Institute for the Future, however critics argue that the discussion is premature. Future Superintelligence
wikipedia
wiki_11_chunk_68
Artificial intelligence
A superintelligence, hyperintelligence, or superhuman intelligence, is a hypothetical agent that would possess intelligence far surpassing that of the brightest and most gifted human mind. Superintelligence may also refer to the form or degree of intelligence possessed by such an agent.
wikipedia
wiki_11_chunk_69
Artificial intelligence
If research into artificial general intelligence produced sufficiently intelligent software, it might be able to reprogram and improve itself. The improved software would be even better at improving itself, leading to recursive self-improvement. Its intelligence would increase exponentially in an intelligence explosion and could dramatically surpass humans. Science fiction writer Vernor Vinge named this scenario the "singularity". Because it is difficult or impossible to know the limits of intelligence or the capabilities of superintelligent machines, the technological singularity is an occurrence beyond which events are unpredictable or even unfathomable.
wikipedia
wiki_11_chunk_70
Artificial intelligence
Robot designer Hans Moravec, cyberneticist Kevin Warwick, and inventor Ray Kurzweil have predicted that humans and machines will merge in the future into cyborgs that are more capable and powerful than either. This idea, called transhumanism, has roots in Aldous Huxley and Robert Ettinger. Edward Fredkin argues that "artificial intelligence is the next stage in evolution", an idea first proposed by Samuel Butler's "Darwin among the Machines" as far back as 1863, and expanded upon by George Dyson in his book of the same name in 1998. Risks Technological unemployment
wikipedia
wiki_11_chunk_71
Artificial intelligence
In the past technology has tended to increase rather than reduce total employment, but economists acknowledge that "we're in uncharted territory" with AI. A survey of economists showed disagreement about whether the increasing use of robots and AI will cause a substantial increase in long-term unemployment, but they generally agree that it could be a net benefit, if productivity gains are redistributed. Subjective estimates of the risk vary widely; for example, Michael Osborne and Carl Benedikt Frey estimate 47% of U.S. jobs are at "high risk" of potential automation, while an OECD report classifies only 9% of U.S. jobs as "high risk".
wikipedia
wiki_11_chunk_72
Artificial intelligence
Unlike previous waves of automation, many middle-class jobs may be eliminated by artificial intelligence; The Economist states that "the worry that AI could do to white-collar jobs what steam power did to blue-collar ones during the Industrial Revolution" is "worth taking seriously". Jobs at extreme risk range from paralegals to fast food cooks, while job demand is likely to increase for care-related professions ranging from personal healthcare to the clergy. Bad actors and weaponized AI
wikipedia
wiki_11_chunk_73
Artificial intelligence
AI provides a number of tools that are particularly useful for authoritarian governments: smart spyware, face recognition and voice recognition allow widespread surveillance; such surveillance allows machine learning to classify potential enemies of the state and can prevent them from hiding; recommendation systems can precisely target propaganda and misinformation for maximum effect; deepfakes aid in producing misinformation; advanced AI can make centralized decision making more competitive with liberal and decentralized systems such as markets.
wikipedia
wiki_11_chunk_74
Artificial intelligence
Terrorists, criminals and rogue states may use other forms of weaponized AI such as advanced digital warfare and lethal autonomous weapons. By 2015, over fifty countries were reported to be researching battlefield robots. Algorithmic bias
wikipedia
wiki_11_chunk_75
Artificial intelligence
AI programs can become biased after learning from real world data. It is not typically introduced by the system designers, but is learned by the program, and thus the programmers are often unaware that the bias exists. Bias can be inadvertently introduced by the way training data is selected. It can also emerge from correlations: AI is used to classify individuals into groups and then make predictions assuming that the individual will resemble other members of the group. In some cases, this assumption may be unfair. An example of this is COMPAS, a commercial program widely used by U.S. courts to assess the likelihood of a defendant becoming a recidivist. ProPublica claims that the COMPAS-assigned recidivism risk level of black defendants is far more likely to be an overestimate than that of white defendants, despite the fact that the program was not told the races of the defendants. Other examples where algorithmic bias can lead to unfair outcomes are when AI is used for credit rating or hiring.
wikipedia
wiki_11_chunk_76
Artificial intelligence
Existential risk
wikipedia
wiki_11_chunk_77
Artificial intelligence
Superintelligent AI may be able to improve itself to the point that humans could not control it. This could, as physicist Stephen Hawking puts it, "spell the end of the human race". Philosopher Nick Bostrom argues that sufficiently intelligent AI, if it chooses actions based on achieving some goal, will exhibit convergent behavior such as acquiring resources or protecting itself from being shut down. If this AI's goals do not fully reflect humanity's, it might need to harm humanity to acquire more resources or prevent itself from being shut down, ultimately to better achieve its goal. He concludes that AI poses a risk to mankind, however humble or "friendly" its stated goals might be. Political scientist Charles T. Rubin argues that "any sufficiently advanced benevolence may be indistinguishable from malevolence." Humans should not assume machines or robots would treat us favorably because there is no a priori reason to believe that they would share our system of morality.
wikipedia
wiki_11_chunk_78
Artificial intelligence
The opinion of experts and industry insiders is mixed, with sizable fractions both concerned and unconcerned by risk from eventual superhumanly-capable AI. Stephen Hawking, Microsoft founder Bill Gates, history professor Yuval Noah Harari, and SpaceX founder Elon Musk have all expressed serious misgivings about the future of AI. Prominent tech titans including Peter Thiel (Amazon Web Services) and Musk have committed more than $1 billion to nonprofit companies that champion responsible AI development, such as OpenAI and the Future of Life Institute. Mark Zuckerberg (CEO, Facebook) has said that artificial intelligence is helpful in its current form and will continue to assist humans. Other experts argue is that the risks are far enough in the future to not be worth researching, or that humans will be valuable from the perspective of a superintelligent machine. Rodney Brooks, in particular, has said that "malevolent" AI is still centuries away.
wikipedia
wiki_11_chunk_79
Artificial intelligence
Ethical machines Friendly AI are machines that have been designed from the beginning to minimize risks and to make choices that benefit humans. Eliezer Yudkowsky, who coined the term, argues that developing friendly AI should be a higher research priority: it may require a large investment and it must be completed before AI becomes an existential risk. Machines with intelligence have the potential to use their intelligence to make ethical decisions. The field of machine ethics provides machines with ethical principles and procedures for resolving ethical dilemmas. Machine ethics is also called machine morality, computational ethics or computational morality, and was founded at an AAAI symposium in 2005.
wikipedia
wiki_11_chunk_80
Artificial intelligence
Others approaches include Wendell Wallach's "artificial moral agents" and Stuart J. Russell's three principles for developing provably beneficial machines.
wikipedia
wiki_11_chunk_81
Artificial intelligence
Human-Centered AI Human-Centered Artificial Intelligence (HCAI) is a set of processes for designing applications that are reliable, safe, and trustworthy. These extend the processes of user experience design such as user observation and interviews. Further processes include discussions with stakeholders, usability testing, iterative refinement and continuing evaluation in use of systems that employ AI and machine learning algorithms. Human-Centered AI manifests in products that are designed to amplify, augment, empower and enhance human performance. These products ensure high levels of human control and high levels of automation.
wikipedia
wiki_11_chunk_82
Artificial intelligence
HCAI research includes governance structures that include safety cultures within organizations and independent oversight by experienced groups that review plans for new projects, continuous evaluation of usage, and retrospective analysis of failures. The rise of HCAI is visible in topics such as explainable AI, transparency, audit trail, fairness, trustworthiness, and controllable systems. Regulation
wikipedia
wiki_11_chunk_83
Artificial intelligence
The regulation of artificial intelligence is the development of public sector policies and laws for promoting and regulating artificial intelligence (AI); it is therefore related to the broader regulation of algorithms. The regulatory and policy landscape for AI is an emerging issue in jurisdictions globally. Between 2016 and 2020, more than 30 countries adopted dedicated strategies for AI. Most EU member states had released national AI strategies, as had Canada, China, India, Japan, Mauritius, the Russian Federation, Saudi Arabia, United Arab Emirates, USA and Vietnam. Others were in the process of elaborating their own AI strategy, including Bangladesh, Malaysia and Tunisia. The Global Partnership on Artificial Intelligence was launched in June 2020, stating a need for AI to be developed in accordance with human rights and democratic values, to ensure public confidence and trust in the technology. Henry Kissinger, Eric Schmidt, and Daniel Huttenlocher published an joint statement in November 2021 calling for a government commission to regulate AI.
wikipedia
wiki_11_chunk_84
Artificial intelligence
In fiction Thought-capable artificial beings have appeared as storytelling devices since antiquity, and have been a persistent theme in science fiction.
wikipedia
wiki_11_chunk_85
Artificial intelligence
A common trope in these works began with Mary Shelley's Frankenstein, where a human creation becomes a threat to its masters. This includes such works as Arthur C. Clarke's and Stanley Kubrick's 2001: A Space Odyssey (both 1968), with HAL 9000, the murderous computer in charge of the Discovery One spaceship, as well as The Terminator (1984) and The Matrix (1999). In contrast, the rare loyal robots such as Gort from The Day the Earth Stood Still (1951) and Bishop from Aliens (1986) are less prominent in popular culture.
wikipedia
wiki_11_chunk_86
Artificial intelligence
Isaac Asimov introduced the Three Laws of Robotics in many books and stories, most notably the "Multivac" series about a super-intelligent computer of the same name. Asimov's laws are often brought up during lay discussions of machine ethics; while almost all artificial intelligence researchers are familiar with Asimov's laws through popular culture, they generally consider the laws useless for many reasons, one of which is their ambiguity. Transhumanism (the merging of humans and machines) is explored in the manga Ghost in the Shell and the science-fiction series Dune.
wikipedia
wiki_11_chunk_87
Artificial intelligence
Several works use AI to force us to confront the fundamental question of what makes us human, showing us artificial beings that have the ability to feel, and thus to suffer. This appears in Karel Čapek's R.U.R., the films A.I. Artificial Intelligence and Ex Machina, as well as the novel Do Androids Dream of Electric Sheep?, by Philip K. Dick. Dick considers the idea that our understanding of human subjectivity is altered by technology created with artificial intelligence. See also
wikipedia
wiki_11_chunk_88
Artificial intelligence
A.I. Rising AI control problem Artificial intelligence arms race Artificial general intelligence Behavior selection algorithm Business process automation Case-based reasoning Citizen Science Emergent algorithm Female gendering of AI technologies Glossary of artificial intelligence Robotic process automation Synthetic intelligence Universal basic income Weak AI Explanatory notes Citations References AI textbooks These were the four the most widely used AI textbooks in 2008. . Later editions. . The two most widely used textbooks in 2021. History of AI . . Other sources was introduced by Kunihiko Fukushima in 1980. | . Presidential Address to the Association for the Advancement of Artificial Intelligence. Later published as . Further reading
wikipedia
wiki_11_chunk_89
Artificial intelligence
DH Author, "Why Are There Still So Many Jobs? The History and Future of Workplace Automation" (2015) 29(3) Journal of Economic Perspectives 3. Boden, Margaret, Mind As Machine, Oxford University Press, 2006. Cukier, Kenneth, "Ready for Robots? How to Think about the Future of AI", Foreign Affairs, vol. 98, no. 4 (July/August 2019), pp. 192–98. George Dyson, historian of computing, writes (in what might be called "Dyson's Law") that "Any system simple enough to be understandable will not be complicated enough to behave intelligently, while any system complicated enough to behave intelligently will be too complicated to understand." (p. 197.) Computer scientist Alex Pentland writes: "Current AI machine-learning algorithms are, at their core, dead simple stupid. They work, but they work by brute force." (p. 198.) Domingos, Pedro, "Our Digital Doubles: AI will serve our species, not control it", Scientific American, vol. 319, no. 3 (September 2018), pp. 88–93. Gopnik, Alison, "Making AI More Human: Artificial intelligence has staged a revival by starting to incorporate what we know about how children learn", Scientific American, vol. 316, no. 6 (June 2017), pp. 60–65. Halpern, Sue, "The Human Costs of AI" (review of Kate Crawford, Atlas of AI: Power, Politics, and the Planetary Costs of Artificial Intelligence, Yale University Press, 2021, 327 pp.; Simon Chesterman, We, the Robots?: Regulating Artificial Intelligence and the Limits of the Law, Cambridge University Press, 2021, 289 pp.; Keven Roose, Futureproof: 9 Rules for Humans in the Age of Automation, Random House, 217 pp.; Erik J. Larson, The Myth of Artificial Intelligence: Why Computers Can't Think the Way We Do, Belknap Press / Harvard University Press, 312 pp.), The New York Review of Books, vol. LXVIII, no. 16 (21 October 2021), pp. 29–31. "AI training models can replicate entrenched social and cultural biases. [...] Machines only know what they know from the data they have been given. [p. 30.] [A]rtificial general intelligence–machine-based intelligence that matches our own–is beyond the capacity of algorithmic machine learning... 'Your brain is one piece in a broader system which includes your body, your environment, other humans, and culture as a whole.' [E]ven machines that master the tasks they are trained to perform can't jump domains. AIVA, for example, can't drive a car even though it can write music (and wouldn't even be able to do that without Bach and Beethoven [and other composers on which AIVA is trained])." (p. 31.) Johnston, John (2008) The Allure of Machinic Life: Cybernetics, Artificial Life, and the New AI, MIT Press. Koch, Christof, "Proust among the Machines", Scientific American, vol. 321, no. 6 (December 2019), pp. 46–49. Christof Koch doubts the possibility of "intelligent" machines attaining consciousness, because "[e]ven the most sophisticated brain simulations are unlikely to produce conscious feelings." (p. 48.) According to Koch, "Whether machines can become sentient [is important] for ethical reasons. If computers experience life through their own senses, they cease to be purely a means to an end determined by their usefulness to... humans. Per GNW [the Global Neuronal Workspace theory], they turn from mere objects into subjects... with a point of view.... Once computers' cognitive abilities rival those of humanity, their impulse to push for legal and political rights will become irresistible—the right not to be deleted, not to have their memories wiped clean, not to suffer pain and degradation. The alternative, embodied by IIT [Integrated Information Theory], is that computers will remain only supersophisticated machinery, ghostlike empty shells, devoid of what we value most: the feeling of life itself." (p. 49.) Marcus, Gary, "Am I Human?: Researchers need new ways to distinguish artificial intelligence from the natural kind", Scientific American, vol. 316, no. 3 (March 2017), pp. 58–63. A stumbling block to AI has been an incapacity for reliable disambiguation. An example is the "pronoun disambiguation problem": a machine has no way of determining to whom or what a pronoun in a sentence refers. (p. 61.) E McGaughey, 'Will Robots Automate Your Job Away? Full Employment, Basic Income, and Economic Democracy' (2018) SSRN, part 2(3) . George Musser, "Artificial Imagination: How machines could learn creativity and common sense, among other human qualities", Scientific American, vol. 320, no. 5 (May 2019), pp. 58–63. Myers, Courtney Boyd ed. (2009). "The AI Report" . Forbes June 2009 Scharre, Paul, "Killer Apps: The Real Dangers of an AI Arms Race", Foreign Affairs, vol. 98, no. 3 (May/June 2019), pp. 135–44. "Today's AI technologies are powerful but unreliable. Rules-based systems cannot deal with circumstances their programmers did not anticipate. Learning systems are limited by the data on which they were trained. AI failures have already led to tragedy. Advanced autopilot features in cars, although they perform well in some circumstances, have driven cars without warning into trucks, concrete barriers, and parked cars. In the wrong situation, AI systems go from supersmart to superdumb in an instant. When an enemy is trying to manipulate and hack an AI system, the risks are even greater." (p. 140.) Sun, R. & Bookman, L. (eds.), Computational Architectures: Integrating Neural and Symbolic Processes. Kluwer Academic Publishers, Needham, MA. 1994. Taylor, Paul, "Insanely Complicated, Hopelessly Inadequate" (review of Brian Cantwell Smith, The Promise of Artificial Intelligence: Reckoning and Judgment, MIT, 2019, , 157 pp.; Gary Marcus and Ernest Davis, Rebooting AI: Building Artificial Intelligence We Can Trust, Ballantine, 2019, , 304 pp.; Judea Pearl and Dana Mackenzie, The Book of Why: The New Science of Cause and Effect, Penguin, 2019, , 418 pp.), London Review of Books, vol. 43, no. 2 (21 January 2021), pp. 37–39. Paul Taylor writes (p. 39): "Perhaps there is a limit to what a computer can do without knowing that it is manipulating imperfect representations of an external reality." Tooze, Adam, "Democracy and Its Discontents", The New York Review of Books, vol. LXVI, no. 10 (6 June 2019), pp. 52–53, 56–57. "Democracy has no clear answer for the mindless operation of bureaucratic and technological power. We may indeed be witnessing its extension in the form of artificial intelligence and robotics. Likewise, after decades of dire warning, the environmental problem remains fundamentally unaddressed.... Bureaucratic overreach and environmental catastrophe are precisely the kinds of slow-moving existential challenges that democracies deal with very badly.... Finally, there is the threat du jour: corporations and the technologies they promote." (pp. 56–57.)
wikipedia
wiki_11_chunk_90
Artificial intelligence
External links Artificial Intelligence. BBC Radio 4 discussion with John Agar, Alison Adam & Igor Aleksander (In Our Time, Dec. 8, 2005). Sources Cybernetics Formal sciences Computational neuroscience Emerging technologies Unsolved problems in computer science Computational fields of study
wikipedia
wiki_12_chunk_0
Artistic revolution
Throughout history, forms of art have gone through periodic abrupt changes called artistic revolutions. Movements have come to an end to be replaced by a new movement markedly different in striking ways. See also cultural movements. Scientific and technological Not all artistic revolutions were political. Sometimes, science and technological innovations have brought about unforeseen transformations in the works of artists. The stylistic revolution known as Impressionism, by painters eager to more accurately capture the changing colors of light and shadow, is inseparable from discoveries and inventions in the mid-19th century in which the style was born.
wikipedia
wiki_12_chunk_1
Artistic revolution
Eugene Chevreul, a French chemist hired as director of dyes at a French tapestry works, began to investigate the optical nature of color in order to improve color in fabrics. Chevreul realized It was the eye, and not the dye, that had the greatest influence on color, and from this, he revolutionized color theory by grasping what came to be called the law of simultaneous contrast: that colors mutually influence one another when juxtaposed, each imposing its own complementary color on the other. The French painter Eugène Delacroix, who had been experimenting with what he called broken tones, embraced Chevreul's book, "The Law of Contrast of Color (1839) with its explanations of how juxtaposed colors can enhance or diminish each other, and his exploration of all the visible colors of the spectrum. Inspired by Chevreul’s 1839 treatise, Delacroix passed his enthusiasm on to the young artists who were inspired by him. It was Chevreul who led the Impressionists to grasp that they should apply separate brushstrokes of pure color to a canvas and allow the viewer’s eye to combine them optically.
wikipedia
wiki_12_chunk_2
Artistic revolution
They were aided greatly in this by innovations in oil paint itself. Since the Renaissance, painters had to grind pigment, add oil and thus create their own paints; these time-consuming paints also quickly dried out, making studio painting a necessity for large works, and limiting painters to mix one or two colors at a time and fill in an entire area using just that one color before it dried out. in 1841, a little-known American painter named John G. Rand invented a simple improvement without which the Impressionist movement could not have occurred: the small, flexible tin tube with removable cap in which oil paints could be stored. Oil paints kept in such tubes stayed moist and usable -- and quite portable. For the first time since the Renaissance, painters were not trapped by the time frame of how quickly oil paint dried.
wikipedia
wiki_12_chunk_3
Artistic revolution
Paints in tubes could be easily loaded up and carried out into the real world, to directly observe the play of color and natural light, in shadow and movement, to paint in the moment. Selling the oil paint in tubes also brought about the arrival of dazzling new pigments - chrome yellow, cadmium blue - invented by 19th century industrial chemists. The tubes freed the Impressionists to paint quickly, and across an entire canvas, rather than carefully delineated single-color sections at a time; in short, to sketch directly in oil - racing across the canvas in every color that came to hand and thus inspiring their name of "impressionists" - since such speedy, bold brushwork and dabs of separate colors made contemporary critics think their paintings were mere impressions, not finished paintings, which were to have no visible brush marks at all, seamless under layers of varnish.
wikipedia
wiki_12_chunk_4
Artistic revolution
Pierre-Auguste Renoir said, “Without colors in tubes, there would be no Cézanne, no Monet, no Pissarro, and no Impressionism.”
wikipedia
wiki_12_chunk_5
Artistic revolution
Finally, the careful, hyper-realistic techniques of French neo-classicism were seen as stiff and lifeless when compared to the remarkable new vision of the world as seen through the new invention of photography by the mid-1850s. It was not merely that the increasing ability of this new invention, particularly by the French inventor Daguerre, made the realism of the painted image redundant as he deliberately competed in the Paris diorama with large-scale historical paintings. The neo-classical subject matter, limited by Academic tradition to Greek and Roman legends, historical battles and Biblical stories, seemed oppressively clichéd and limited to artists eager to explore the actual world in front of their own eyes revealed by the camera - daily life, candid groupings of everyday people doing simple things, Paris itself, rural landscapes and most particularly the play of captured light - not the imaginary lionizing of unseen past events. Early photographs influenced Impressionist style by its use of asymmetry, cropping and most obviously the blurring of motion, as inadvertently captured in the very slow speeds of early photography.
wikipedia
wiki_12_chunk_6
Artistic revolution
Edgar Degas, Claude Monet, Pierre-Auguste Renoir - in their framing, use of color, light and shadow, subject matter - put these innovations to work to create a new language of visual beauty and meaning. Faking revolution: the C.I.A. and Abstract Expressionism
wikipedia
wiki_12_chunk_7
Artistic revolution
Their initial break with realism into an exploration of light, color and the nature of paint was brought to an ultimate conclusion by the Abstract Expressionists who broke away from recognizable content of any kind into works of pure shape, color and painterliness which emerged at the end of the second world war. At first thought of as primitive, inept works - as in "my four year old could do that"—these works were misunderstood and neglected until given critical and support by the rise of art journalists and critics who championed their work in the 1940s and 50's, expressing the power of such work in aesthetic terms the artists themselves seldom used, or even understood. Jackson Pollock who pioneered splatter painting, dispensing with a paint brush altogether, soon became lionized as the angry young man in a large spread in Life Magazine.
wikipedia
wiki_12_chunk_8
Artistic revolution
In fact, in a deliberate, secret and successful effort to separate artistic revolutions from political ones, abstract expressionists like Pollock, Robert Motherwell, Willem de Kooning and Mark Rothko, while seemingly difficult, pathbreaking artists, were in fact secretly supported for twenty years by the C.I.A. in a Cold War policy begun in 1947 to prove that the United States could foster more artistic freedom than the Soviet bloc. "It was recognized that Abstract Expressionism was the kind of art that made Socialist Realism look even more stylized and rigid and confined than it was, " said former C.I.A. case worker Donald Jameson, who finally broke the silence on this program in 1995. Ironically, the covert C.I.A. support for these radical works was required because an attempt to use government funds for a European tour of these works during the Truman administration led to a public uproar in conservative McCarthy-era America, with Truman famously remarking, "If that's art, I'm a Hottentot." Thus the program was hidden under the guise of fabricated foundations and the support of wealthy patrons who were actually using C.I.A. funds, not their own, to sponsor traveling exhibitions of American abstract expressionists all over the world, publish books and articles praising them and to purchase and exhibit Abstract Expressionist works in major American and British museums. Thomas Braden, in charge of these cultural programs for the C.I.A.. in the early years of the Cold War, had formerly been executive secretary of the Museum of Modern Art, America's leading institution for 20th Century art and the charges of collusion between the two echoed for many years after this program was revealed, though most of the artists involved had no idea they were being used in this way and were furious when they found out.
wikipedia
wiki_12_chunk_9
Artistic revolution
References Art history Revolutions by type
wikipedia
wiki_13_chunk_0
Atomic physics
Atomic physics is the field of physics that studies atoms as an isolated system of electrons and an atomic nucleus. Atomic physics typically refers to the study of atomic structure and the interaction between atoms. It is primarily concerned with the way in which electrons are arranged around the nucleus and the processes by which these arrangements change. This comprises ions, neutral atoms and, unless otherwise stated, it can be assumed that the term atom includes ions.
wikipedia
wiki_13_chunk_1
Atomic physics
The term atomic physics can be associated with nuclear power and nuclear weapons, due to the synonymous use of atomic and nuclear in standard English. Physicists distinguish between atomic physics—which deals with the atom as a system consisting of a nucleus and electrons—and nuclear physics, which studies nuclear reactions and special properties of atomic nuclei. As with many scientific fields, strict delineation can be highly contrived and atomic physics is often considered in the wider context of atomic, molecular, and optical physics. Physics research groups are usually so classified.
wikipedia
wiki_13_chunk_2
Atomic physics
Isolated atoms Atomic physics primarily considers atoms in isolation. Atomic models will consist of a single nucleus that may be surrounded by one or more bound electrons. It is not concerned with the formation of molecules (although much of the physics is identical), nor does it examine atoms in a solid state as condensed matter. It is concerned with processes such as ionization and excitation by photons or collisions with atomic particles.
wikipedia
wiki_13_chunk_3
Atomic physics
While modelling atoms in isolation may not seem realistic, if one considers atoms in a gas or plasma then the time-scales for atom-atom interactions are huge in comparison to the atomic processes that are generally considered. This means that the individual atoms can be treated as if each were in isolation, as the vast majority of the time they are. By this consideration atomic physics provides the underlying theory in plasma physics and atmospheric physics, even though both deal with very large numbers of atoms.
wikipedia
wiki_13_chunk_4
Atomic physics
Electronic configuration Electrons form notional shells around the nucleus. These are normally in a ground state but can be excited by the absorption of energy from light (photons), magnetic fields, or interaction with a colliding particle (typically ions or other electrons). Electrons that populate a shell are said to be in a bound state. The energy necessary to remove an electron from its shell (taking it to infinity) is called the binding energy. Any quantity of energy absorbed by the electron in excess of this amount is converted to kinetic energy according to the conservation of energy. The atom is said to have undergone the process of ionization.
wikipedia
wiki_13_chunk_5
Atomic physics
If the electron absorbs a quantity of energy less than the binding energy, it will be transferred to an excited state. After a certain time, the electron in an excited state will "jump" (undergo a transition) to a lower state. In a neutral atom, the system will emit a photon of the difference in energy, since energy is conserved.
wikipedia
wiki_13_chunk_6
Atomic physics
If an inner electron has absorbed more than the binding energy (so that the atom ionizes), then a more outer electron may undergo a transition to fill the inner orbital. In this case, a visible photon or a characteristic x-ray is emitted, or a phenomenon known as the Auger effect may take place, where the released energy is transferred to another bound electron, causing it to go into the continuum. The Auger effect allows one to multiply ionize an atom with a single photon.
wikipedia
wiki_13_chunk_7
Atomic physics
There are rather strict selection rules as to the electronic configurations that can be reached by excitation by light — however there are no such rules for excitation by collision processes. History and developments
wikipedia
wiki_13_chunk_8
Atomic physics
One of the earliest steps towards atomic physics was the recognition that matter was composed of atoms. It forms a part of the texts written in 6th century BC to 2nd century BC such as those of Democritus or Vaisheshika Sutra written by Kanad. This theory was later developed in the modern sense of the basic unit of a chemical element by the British chemist and physicist John Dalton in the 18th century. At this stage, it wasn't clear what atoms were although they could be described and classified by their properties (in bulk). The invention of the periodic system of elements by Mendeleev was another great step forward.
wikipedia
wiki_13_chunk_9
Atomic physics
The true beginning of atomic physics is marked by the discovery of spectral lines and attempts to describe the phenomenon, most notably by Joseph von Fraunhofer. The study of these lines led to the Bohr atom model and to the birth of quantum mechanics. In seeking to explain atomic spectra an entirely new mathematical model of matter was revealed. As far as atoms and their electron shells were concerned, not only did this yield a better overall description, i.e. the atomic orbital model, but it also provided a new theoretical basis for chemistry (quantum chemistry) and spectroscopy.
wikipedia
wiki_13_chunk_10
Atomic physics
Since the Second World War, both theoretical and experimental fields have advanced at a rapid pace. This can be attributed to progress in computing technology, which has allowed larger and more sophisticated models of atomic structure and associated collision processes. Similar technological advances in accelerators, detectors, magnetic field generation and lasers have greatly assisted experimental work. Significant atomic physicists See also Particle physics Isomeric shift Atomic engineering Bibliography References External links MIT-Harvard Center for Ultracold Atoms Joint Quantum Institute at University of Maryland and NIST Atomic Physics on the Internet JILA (Atomic Physics) ORNL Physics Division Atomic, molecular, and optical physics
wikipedia
wiki_14_chunk_0
Ada (programming language)
Ada is a structured, statically typed, imperative, and object-oriented high-level programming language, extended from Pascal and other languages. It has built-in language support for design by contract (DbC), extremely strong typing, explicit concurrency, tasks, synchronous message passing, protected objects, and non-determinism. Ada improves code safety and maintainability by using the compiler to find errors in favor of runtime errors. Ada is an international technical standard, jointly defined by the International Organization for Standardization (ISO), and the International Electrotechnical Commission (IEC). , the standard, called Ada 2012 informally, is ISO/IEC 8652:2012.
wikipedia
wiki_14_chunk_1
Ada (programming language)
Ada was originally designed by a team led by French computer scientist Jean Ichbiah of CII Honeywell Bull under contract to the United States Department of Defense (DoD) from 1977 to 1983 to supersede over 450 programming languages used by the DoD at that time. Ada was named after Ada Lovelace (1815–1852), who has been credited as the first computer programmer.
wikipedia
wiki_14_chunk_2
Ada (programming language)
Features Ada was originally designed for embedded and real-time systems. The Ada 95 revision, designed by S. Tucker Taft of Intermetrics between 1992 and 1995, improved support for systems, numerical, financial, and object-oriented programming (OOP). Features of Ada include: strong typing, modular programming mechanisms (packages), run-time checking, parallel processing (tasks, synchronous message passing, protected objects, and nondeterministic select statements), exception handling, and generics. Ada 95 added support for object-oriented programming, including dynamic dispatch.
wikipedia
wiki_14_chunk_3
Ada (programming language)
The syntax of Ada minimizes choices of ways to perform basic operations, and prefers English keywords (such as "or else" and "and then") to symbols (such as "||" and "&&"). Ada uses the basic arithmetical operators "+", "-", "*", and "/", but avoids using other symbols. Code blocks are delimited by words such as "declare", "begin", and "end", where the "end" (in most cases) is followed by the identifier of the block it closes (e.g., if ... end if, loop ... end loop). In the case of conditional blocks this avoids a dangling else that could pair with the wrong nested if-expression in other languages like C or Java.
wikipedia
wiki_14_chunk_4
Ada (programming language)
Ada is designed for developing very large software systems. Ada packages can be compiled separately. Ada package specifications (the package interface) can also be compiled separately without the implementation to check for consistency. This makes it possible to detect problems early during the design phase, before implementation starts.
wikipedia
wiki_14_chunk_5
Ada (programming language)
A large number of compile-time checks are supported to help avoid bugs that would not be detectable until run-time in some other languages or would require explicit checks to be added to the source code. For example, the syntax requires explicitly named closing of blocks to prevent errors due to mismatched end tokens. The adherence to strong typing allows detecting many common software errors (wrong parameters, range violations, invalid references, mismatched types, etc.) either during compile-time, or otherwise during run-time. As concurrency is part of the language specification, the compiler can in some cases detect potential deadlocks. Compilers also commonly check for misspelled identifiers, visibility of packages, redundant declarations, etc. and can provide warnings and useful suggestions on how to fix the error.
wikipedia
wiki_14_chunk_6
Ada (programming language)
Ada also supports run-time checks to protect against access to unallocated memory, buffer overflow errors, range violations, off-by-one errors, array access errors, and other detectable bugs. These checks can be disabled in the interest of runtime efficiency, but can often be compiled efficiently. It also includes facilities to help program verification. For these reasons, Ada is widely used in critical systems, where any anomaly might lead to very serious consequences, e.g., accidental death, injury or severe financial loss. Examples of systems where Ada is used include avionics, air traffic control, railways, banking, military and space technology.
wikipedia
wiki_14_chunk_7
Ada (programming language)
Ada's dynamic memory management is high-level and type-safe. Ada has no generic or untyped pointers; nor does it implicitly declare any pointer type. Instead, all dynamic memory allocation and deallocation must occur via explicitly declared access types. Each access type has an associated storage pool that handles the low-level details of memory management; the programmer can either use the default storage pool or define new ones (this is particularly relevant for Non-Uniform Memory Access). It is even possible to declare several different access types that all designate the same type but use different storage pools. Also, the language provides for accessibility checks, both at compile time and at run time, that ensures that an access value cannot outlive the type of the object it points to.
wikipedia
wiki_14_chunk_8
Ada (programming language)
Though the semantics of the language allow automatic garbage collection of inaccessible objects, most implementations do not support it by default, as it would cause unpredictable behaviour in real-time systems. Ada does support a limited form of region-based memory management; also, creative use of storage pools can provide for a limited form of automatic garbage collection, since destroying a storage pool also destroys all the objects in the pool.
wikipedia
wiki_14_chunk_9
Ada (programming language)
A double-dash ("--"), resembling an em dash, denotes comment text. Comments stop at end of line, to prevent unclosed comments from accidentally voiding whole sections of source code. Disabling a whole block of code now requires the prefixing of each line (or column) individually with "--". While clearly denoting disabled code with a column of repeated "--" down the page this renders the experimental dis/re-enablement of large blocks a more drawn out process.
wikipedia
wiki_14_chunk_10
Ada (programming language)
The semicolon (";") is a statement terminator, and the null or no-operation statement is null;. A single ; without a statement to terminate is not allowed.
wikipedia
wiki_14_chunk_11
Ada (programming language)
Unlike most ISO standards, the Ada language definition (known as the Ada Reference Manual or ARM, or sometimes the Language Reference Manual or LRM) is free content. Thus, it is a common reference for Ada programmers, not only programmers implementing Ada compilers. Apart from the reference manual, there is also an extensive rationale document which explains the language design and the use of various language constructs. This document is also widely used by programmers. When the language was revised, a new rationale document was written.
wikipedia
wiki_14_chunk_12
Ada (programming language)
One notable free software tool that is used by many Ada programmers to aid them in writing Ada source code is the GNAT Programming Studio, part of the GNU Compiler Collection.
wikipedia
wiki_14_chunk_13
Ada (programming language)
History In the 1970s the US Department of Defense (DoD) became concerned by the number of different programming languages being used for its embedded computer system projects, many of which were obsolete or hardware-dependent, and none of which supported safe modular programming. In 1975, a working group, the High Order Language Working Group (HOLWG), was formed with the intent to reduce this number by finding or creating a programming language generally suitable for the department's and the UK Ministry of Defence's requirements. After many iterations beginning with an original Straw man proposal the eventual programming language was named Ada. The total number of high-level programming languages in use for such projects fell from over 450 in 1983 to 37 by 1996.
wikipedia
wiki_14_chunk_14
Ada (programming language)
The HOLWG working group crafted the Steelman language requirements, a series of documents stating the requirements they felt a programming language should satisfy. Many existing languages were formally reviewed, but the team concluded in 1977 that no existing language met the specifications.
wikipedia
wiki_14_chunk_15
Ada (programming language)
Requests for proposals for a new programming language were issued and four contractors were hired to develop their proposals under the names of Red (Intermetrics led by Benjamin Brosgol), Green (CII Honeywell Bull, led by Jean Ichbiah), Blue (SofTech, led by John Goodenough) and Yellow (SRI International, led by Jay Spitzen). In April 1978, after public scrutiny, the Red and Green proposals passed to the next phase. In May 1979, the Green proposal, designed by Jean Ichbiah at CII Honeywell Bull, was chosen and given the name Ada—after Augusta Ada, Countess of Lovelace. This proposal was influenced by the language LIS that Ichbiah and his group had developed in the 1970s. The preliminary Ada reference manual was published in ACM SIGPLAN Notices in June 1979. The Military Standard reference manual was approved on December 10, 1980 (Ada Lovelace's birthday), and given the number MIL-STD-1815 in honor of Ada Lovelace's birth year. In 1981, C. A. R. Hoare took advantage of his Turing Award speech to criticize Ada for being overly complex and hence unreliable, but subsequently seemed to recant in the foreword he wrote for an Ada textbook.
wikipedia
wiki_14_chunk_16
Ada (programming language)
Ada attracted much attention from the programming community as a whole during its early days. Its backers and others predicted that it might become a dominant language for general purpose programming and not only defense-related work. Ichbiah publicly stated that within ten years, only two programming languages would remain: Ada and Lisp. Early Ada compilers struggled to implement the large, complex language, and both compile-time and run-time performance tended to be slow and tools primitive. Compiler vendors expended most of their efforts in passing the massive, language-conformance-testing, government-required "ACVC" validation suite that was required in another novel feature of the Ada language effort. The Jargon File, a dictionary of computer hacker slang originating in 1975–1983, notes in an entry on Ada that "it is precisely what one might expect given that kind of endorsement by fiat; designed by committee...difficult to use, and overall a disastrous, multi-billion-dollar boondoggle...Ada Lovelace...would almost certainly blanch at the use her name has been latterly put to; the kindest thing that has been said about it is that there is probably a good small language screaming to get out from inside its vast, elephantine bulk."
wikipedia
wiki_14_chunk_17
Ada (programming language)
The first validated Ada implementation was the NYU Ada/Ed translator, certified on April 11, 1983. NYU Ada/Ed is implemented in the high-level set language SETL. Several commercial companies began offering Ada compilers and associated development tools, including Alsys, TeleSoft, DDC-I, Advanced Computer Techniques, Tartan Laboratories, Irvine Compiler, TLD Systems, and Verdix.
wikipedia
wiki_14_chunk_18
Ada (programming language)
In 1991, the US Department of Defense began to require the use of Ada (the Ada mandate) for all software, though exceptions to this rule were often granted. The Department of Defense Ada mandate was effectively removed in 1997, as the DoD began to embrace commercial off-the-shelf (COTS) technology. Similar requirements existed in other NATO countries: Ada was required for NATO systems involving command and control and other functions, and Ada was the mandated or preferred language for defense-related applications in countries such as Sweden, Germany, and Canada.
wikipedia
wiki_14_chunk_19
Ada (programming language)
By the late 1980s and early 1990s, Ada compilers had improved in performance, but there were still barriers to fully exploiting Ada's abilities, including a tasking model that was different from what most real-time programmers were used to.
wikipedia
wiki_14_chunk_20
Ada (programming language)
Because of Ada's safety-critical support features, it is now used not only for military applications, but also in commercial projects where a software bug can have severe consequences, e.g., avionics and air traffic control, commercial rockets such as the Ariane 4 and 5, satellites and other space systems, railway transport and banking. For example, the Airplane Information Management System, the fly-by-wire system software in the Boeing 777, was written in Ada. Developed by Honeywell Air Transport Systems in collaboration with consultants from DDC-I, it became arguably the best-known of any Ada project, civilian or military. The Canadian Automated Air Traffic System was written in 1 million lines of Ada (SLOC count). It featured advanced distributed processing, a distributed Ada database, and object-oriented design. Ada is also used in other air traffic systems, e.g., the UK's next-generation Interim Future Area Control Tools Support (iFACTS) air traffic control system is designed and implemented using SPARK Ada. It is also used in the French TVM in-cab signalling system on the TGV high-speed rail system, and the metro suburban trains in Paris, London, Hong Kong and New York City.
wikipedia
wiki_14_chunk_21
Ada (programming language)
Standardization The language became an ANSI standard in 1983 (ANSI/MIL-STD 1815A), and after translation in French and without any further changes in English became an ISO standard in 1987 (ISO-8652:1987). This version of the language is commonly known as Ada 83, from the date of its adoption by ANSI, but is sometimes referred to also as Ada 87, from the date of its adoption by ISO.
wikipedia
wiki_14_chunk_22
Ada (programming language)
Ada 95, the joint ISO/ANSI standard (ISO-8652:1995) was published in February 1995, making Ada 95 the first ISO standard object-oriented programming language. To help with the standard revision and future acceptance, the US Air Force funded the development of the GNAT Compiler. Presently, the GNAT Compiler is part of the GNU Compiler Collection.
wikipedia
wiki_14_chunk_23
Ada (programming language)
Work has continued on improving and updating the technical content of the Ada language. A Technical Corrigendum to Ada 95 was published in October 2001, and a major Amendment, ISO/IEC 8652:1995/Amd 1:2007 was published on March 9, 2007. At the Ada-Europe 2012 conference in Stockholm, the Ada Resource Association (ARA) and Ada-Europe announced the completion of the design of the latest version of the Ada language and the submission of the reference manual to the International Organization for Standardization (ISO) for approval. ISO/IEC 8652:2012 was published in December 2012.
wikipedia
wiki_14_chunk_24
Ada (programming language)
Other related standards include ISO 8651-3:1988 Information processing systems—Computer graphics—Graphical Kernel System (GKS) language bindings—Part 3: Ada. Language constructs Ada is an ALGOL-like programming language featuring control structures with reserved words such as if, then, else, while, for, and so on. However, Ada also has many data structuring facilities and other abstractions which were not included in the original ALGOL 60, such as type definitions, records, pointers, enumerations. Such constructs were in part inherited from or inspired by Pascal.
wikipedia
wiki_14_chunk_25
Ada (programming language)
"Hello, world!" in Ada A common example of a language's syntax is the Hello world program: (hello.adb) with Ada.Text_IO; use Ada.Text_IO; procedure Hello is begin Put_Line ("Hello, world!"); end Hello; This program can be compiled by using the freely available open source compiler GNAT, by executing gnatmake hello.adb
wikipedia
wiki_14_chunk_26
Ada (programming language)
Data types Ada's type system is not based on a set of predefined primitive types but allows users to declare their own types. This declaration in turn is not based on the internal representation of the type but on describing the goal which should be achieved. This allows the compiler to determine a suitable memory size for the type, and to check for violations of the type definition at compile time and run time (i.e., range violations, buffer overruns, type consistency, etc.). Ada supports numerical types defined by a range, modulo types, aggregate types (records and arrays), and enumeration types. Access types define a reference to an instance of a specified type; untyped pointers are not permitted. Special types provided by the language are task types and protected types.
wikipedia
wiki_14_chunk_27
Ada (programming language)
For example, a date might be represented as: type Day_type is range 1 .. 31; type Month_type is range 1 .. 12; type Year_type is range 1800 .. 2100; type Hours is mod 24; type Weekday is (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday); type Date is record Day : Day_type; Month : Month_type; Year : Year_type; end record;
wikipedia
wiki_14_chunk_28
Ada (programming language)
Types can be refined by declaring subtypes: subtype Working_Hours is Hours range 0 .. 12; -- at most 12 Hours to work a day subtype Working_Day is Weekday range Monday .. Friday; -- Days to work Work_Load: constant array(Working_Day) of Working_Hours -- implicit type declaration := (Friday => 6, Monday => 4, others => 10); -- lookup table for working hours with initialization
wikipedia
wiki_14_chunk_29
Ada (programming language)
Types can have modifiers such as limited, abstract, private etc. Private types can only be accessed and limited types can only be modified or copied within the scope of the package that defines them. Ada 95 adds further features for object-oriented extension of types. Control structures Ada is a structured programming language, meaning that the flow of control is structured into standard statements. All standard constructs and deep-level early exit are supported, so the use of the also supported "go to" commands is seldom needed.
wikipedia
wiki_14_chunk_30
Ada (programming language)
-- while a is not equal to b, loop. while a /= b loop Ada.Text_IO.Put_Line ("Waiting"); end loop; if a > b then Ada.Text_IO.Put_Line ("Condition met"); else Ada.Text_IO.Put_Line ("Condition not met"); end if; for i in 1 .. 10 loop Ada.Text_IO.Put ("Iteration: "); Ada.Text_IO.Put (i); Ada.Text_IO.Put_Line; end loop;
wikipedia
wiki_14_chunk_31
Ada (programming language)
loop a := a + 1; exit when a = 10; end loop; case i is when 0 => Ada.Text_IO.Put ("zero"); when 1 => Ada.Text_IO.Put ("one"); when 2 => Ada.Text_IO.Put ("two"); -- case statements have to cover all possible cases: when others => Ada.Text_IO.Put ("none of the above"); end case;
wikipedia
wiki_14_chunk_32
Ada (programming language)
for aWeekday in Weekday'Range loop -- loop over an enumeration Put_Line ( Weekday'Image(aWeekday) ); -- output string representation of an enumeration if aWeekday in Working_Day then -- check of a subtype of an enumeration Put_Line ( " to work for " & Working_Hours'Image (Work_Load(aWeekday)) ); -- access into a lookup table end if; end loop; Packages, procedures and functions Among the parts of an Ada program are packages, procedures and functions.
wikipedia
wiki_14_chunk_33
Ada (programming language)
Example: Package specification (example.ads) package Example is type Number is range 1 .. 11; procedure Print_and_Increment (j: in out Number); end Example; Package body (example.adb) with Ada.Text_IO; package body Example is i : Number := Number'First; procedure Print_and_Increment (j: in out Number) is function Next (k: in Number) return Number is begin return k + 1; end Next;
wikipedia
wiki_14_chunk_34
Ada (programming language)
begin Ada.Text_IO.Put_Line ( "The total is: " & Number'Image(j) ); j := Next (j); end Print_and_Increment; -- package initialization executed when the package is elaborated begin while i < Number'Last loop Print_and_Increment (i); end loop; end Example; This program can be compiled, e.g., by using the freely available open-source compiler GNAT, by executing gnatmake -z example.adb
wikipedia
wiki_14_chunk_35
Ada (programming language)
Packages, procedures and functions can nest to any depth, and each can also be the logical outermost block. Each package, procedure or function can have its own declarations of constants, types, variables, and other procedures, functions and packages, which can be declared in any order.
wikipedia
wiki_14_chunk_36
Ada (programming language)
Concurrency Ada has language support for task-based concurrency. The fundamental concurrent unit in Ada is a task, which is a built-in limited type. Tasks are specified in two parts – the task declaration defines the task interface (similar to a type declaration), the task body specifies the implementation of the task. Depending on the implementation, Ada tasks are either mapped to operating system threads or processes, or are scheduled internally by the Ada runtime.
wikipedia
wiki_14_chunk_37
Ada (programming language)
Tasks can have entries for synchronisation (a form of synchronous message passing). Task entries are declared in the task specification. Each task entry can have one or more accept statements within the task body. If the control flow of the task reaches an accept statement, the task is blocked until the corresponding entry is called by another task (similarly, a calling task is blocked until the called task reaches the corresponding accept statement). Task entries can have parameters similar to procedures, allowing tasks to synchronously exchange data. In conjunction with select statements it is possible to define guards on accept statements (similar to Dijkstra's guarded commands).
wikipedia
wiki_14_chunk_38
Ada (programming language)
Ada also offers protected objects for mutual exclusion. Protected objects are a monitor-like construct, but use guards instead of conditional variables for signaling (similar to conditional critical regions). Protected objects combine the data encapsulation and safe mutual exclusion from monitors, and entry guards from conditional critical regions. The main advantage over classical monitors is that conditional variables are not required for signaling, avoiding potential deadlocks due to incorrect locking semantics. Like tasks, the protected object is a built-in limited type, and it also has a declaration part and a body.
wikipedia
wiki_14_chunk_39
Ada (programming language)
A protected object consists of encapsulated private data (which can only be accessed from within the protected object), and procedures, functions and entries which are guaranteed to be mutually exclusive (with the only exception of functions, which are required to be side effect free and can therefore run concurrently with other functions). A task calling a protected object is blocked if another task is currently executing inside the same protected object, and released when this other task leaves the protected object. Blocked tasks are queued on the protected object ordered by time of arrival.
wikipedia
wiki_14_chunk_40
Ada (programming language)
Protected object entries are similar to procedures, but additionally have guards. If a guard evaluates to false, a calling task is blocked and added to the queue of that entry; now another task can be admitted to the protected object, as no task is currently executing inside the protected object. Guards are re-evaluated whenever a task leaves the protected object, as this is the only time when the evaluation of guards can have changed.
wikipedia
wiki_14_chunk_41
Ada (programming language)
Calls to entries can be requeued to other entries with the same signature. A task that is requeued is blocked and added to the queue of the target entry; this means that the protected object is released and allows admission of another task. The select statement in Ada can be used to implement non-blocking entry calls and accepts, non-deterministic selection of entries (also with guards), time-outs and aborts. The following example illustrates some concepts of concurrent programming in Ada. with Ada.Text_IO; use Ada.Text_IO; procedure Traffic is
wikipedia
wiki_14_chunk_42
Ada (programming language)
type Airplane_ID is range 1..10; -- 10 airplanes task type Airplane (ID: Airplane_ID); -- task representing airplanes, with ID as initialisation parameter type Airplane_Access is access Airplane; -- reference type to Airplane
wikipedia
wiki_14_chunk_43
Ada (programming language)
protected type Runway is -- the shared runway (protected to allow concurrent access) entry Assign_Aircraft (ID: Airplane_ID); -- all entries are guaranteed mutually exclusive entry Cleared_Runway (ID: Airplane_ID); entry Wait_For_Clear; private Clear: Boolean := True; -- protected private data - generally more than only a flag... end Runway; type Runway_Access is access all Runway;
wikipedia
wiki_14_chunk_44
Ada (programming language)
-- the air traffic controller task takes requests for takeoff and landing task type Controller (My_Runway: Runway_Access) is -- task entries for synchronous message passing entry Request_Takeoff (ID: in Airplane_ID; Takeoff: out Runway_Access); entry Request_Approach(ID: in Airplane_ID; Approach: out Runway_Access); end Controller; -- allocation of instances Runway1 : aliased Runway; -- instantiate a runway Controller1: Controller (Runway1'Access); -- and a controller to manage it
wikipedia
wiki_14_chunk_45
Ada (programming language)
------ the implementations of the above types ------ protected body Runway is entry Assign_Aircraft (ID: Airplane_ID) when Clear is -- the entry guard - calling tasks are blocked until the condition is true begin Clear := False; Put_Line (Airplane_ID'Image (ID) & " on runway "); end; entry Cleared_Runway (ID: Airplane_ID) when not Clear is begin Clear := True; Put_Line (Airplane_ID'Image (ID) & " cleared runway "); end;
wikipedia
wiki_14_chunk_46
Ada (programming language)
entry Wait_For_Clear when Clear is begin null; -- no need to do anything here - a task can only enter if "Clear" is true end; end Runway;
wikipedia
wiki_14_chunk_47
Ada (programming language)
task body Controller is begin loop My_Runway.Wait_For_Clear; -- wait until runway is available (blocking call) select -- wait for two types of requests (whichever is runnable first) when Request_Approach'count = 0 => -- guard statement - only accept if there are no tasks queuing on Request_Approach accept Request_Takeoff (ID: in Airplane_ID; Takeoff: out Runway_Access) do -- start of synchronized part My_Runway.Assign_Aircraft (ID); -- reserve runway (potentially blocking call if protected object busy or entry guard false) Takeoff := My_Runway; -- assign "out" parameter value to tell airplane which runway end Request_Takeoff; -- end of the synchronised part or accept Request_Approach (ID: in Airplane_ID; Approach: out Runway_Access) do My_Runway.Assign_Aircraft (ID); Approach := My_Runway; end Request_Approach; or -- terminate if no tasks left who could call terminate; end select; end loop; end;
wikipedia
wiki_14_chunk_48
Ada (programming language)
task body Airplane is Rwy : Runway_Access; begin Controller1.Request_Takeoff (ID, Rwy); -- This call blocks until Controller task accepts and completes the accept block Put_Line (Airplane_ID'Image (ID) & " taking off..."); delay 2.0; Rwy.Cleared_Runway (ID); -- call will not block as "Clear" in Rwy is now false and no other tasks should be inside protected object delay 5.0; -- fly around a bit... loop select -- try to request a runway Controller1.Request_Approach (ID, Rwy); -- this is a blocking call - will run on controller reaching accept block and return on completion exit; -- if call returned we're clear for landing - leave select block and proceed... or delay 3.0; -- timeout - if no answer in 3 seconds, do something else (everything in following block) Put_Line (Airplane_ID'Image (ID) & " in holding pattern"); -- simply print a message end select; end loop; delay 4.0; -- do landing approach... Put_Line (Airplane_ID'Image (ID) & " touched down!"); Rwy.Cleared_Runway (ID); -- notify runway that we're done here. end;
wikipedia
wiki_14_chunk_49
Ada (programming language)
New_Airplane: Airplane_Access; begin for I in Airplane_ID'Range loop -- create a few airplane tasks New_Airplane := new Airplane (I); -- will start running directly after creation delay 4.0; end loop; end Traffic; Pragmas A pragma is a compiler directive that conveys information to the compiler to allow specific manipulating of compiled output. Certain pragmas are built into the language, while others are implementation-specific.
wikipedia
wiki_14_chunk_50
Ada (programming language)
Examples of common usage of compiler pragmas would be to disable certain features, such as run-time type checking or array subscript boundary checking, or to instruct the compiler to insert object code instead of a function call (as C/C++ does with inline functions). Generics See also
wikipedia
wiki_14_chunk_51
Ada (programming language)
APSE – a specification for a programming environment to support software development in Ada Ravenscar profile – a subset of the Ada tasking features designed for safety-critical hard real-time computing SPARK (programming language) – a programming language consisting of a highly restricted subset of Ada, annotated with meta information describing desired component behavior and individual runtime requirements References
wikipedia
wiki_14_chunk_52
Ada (programming language)
International standards ISO/IEC 8652: Information technology—Programming languages—Ada ISO/IEC 15291: Information technology—Programming languages—Ada Semantic Interface Specification (ASIS) ISO/IEC 18009: Information technology—Programming languages—Ada: Conformity assessment of a language processor (ACATS) IEEE Standard 1003.5b-1996, the POSIX Ada binding Ada Language Mapping Specification, the CORBA interface description language (IDL) to Ada mapping Rationale These documents have been published in various forms, including print. Also available apps.dtic.mil, pdf Books 795 pages.
wikipedia
wiki_14_chunk_53
Ada (programming language)
Archives Ada Programming Language Materials, 1981–1990. Charles Babbage Institute, University of Minnesota. Includes literature on software products designed for the Ada language; U.S. government publications, including Ada 9X project reports, technical reports, working papers, newsletters; and user group information. External links Ada - C/C++ changer - MapuSoft DOD Ada programming language (ANSI/MIL STD 1815A-1983) specification JTC1/SC22/WG9 ISO home of Ada Standards
wikipedia