background preloader

Programming paradigm

Programming paradigm
A programming paradigm is a fundamental style of computer programming, a way of building the structure and elements of computer programs. Capablities and styles of various programming languages are defined by their supported programming paradigms; some programming languages are designed to follow only one paradigm, while others support multiple paradigms. There are six main programming paradigms: imperative, declarative, functional, object-oriented, logic and symbolic programming.[1][2][3] Overview[edit] Overview of the various programming paradigms[4]:5 In object-oriented programming, programmers can think of a program as a collection of interacting objects, while in functional programming a program can be thought of as a sequence of stateless function evaluations. Programming paradigms can also be compared with programming models which are abstractions of computer systems. History[edit] Machine code[edit] Procedural languages[edit] All these languages follow the procedural paradigm.

Logic programming Logic programming is a programming paradigm based on formal logic. Programs written in a logical programming language are sets of logical sentences, expressing facts and rules about some problem domain. Together with an inference algorithm, they form a program. A form of logical sentences commonly found in logic programming, but not exclusively, is the Horn clause. p(X, Y) if q(X) and r(Y) Logical sentences can be understood purely declaratively. The programmer can use the declarative reading of logic programs to verify their correctness. History[edit] The use of mathematical logic to represent and execute computer programs is also a feature of the lambda calculus, developed by Alonzo Church in the 1930s. In 1997, the Association of Logic Programming bestowed to fifteen recognized researchers in logic programming the title Founders of Logic Programming to recognize them as pioneers in the field:[1] Prolog[edit] The programming language Prolog was developed in 1972 by Alain Colmerauer.

Technological singularity The technological singularity is the hypothesis that accelerating progress in technologies will cause a runaway effect wherein artificial intelligence will exceed human intellectual capacity and control, thus radically changing civilization in an event called the singularity.[1] Because the capabilities of such an intelligence may be impossible for a human to comprehend, the technological singularity is an occurrence beyond which events may become unpredictable, unfavorable, or even unfathomable.[2] The first use of the term "singularity" in this context was by mathematician John von Neumann. Proponents of the singularity typically postulate an "intelligence explosion",[5][6] where superintelligences design successive generations of increasingly powerful minds, that might occur very quickly and might not stop until the agent's cognitive abilities greatly surpass that of any human. Basic concepts Superintelligence Non-AI singularity Intelligence explosion Exponential growth Plausibility

Prolog Prolog is a general purpose logic programming language associated with artificial intelligence and computational linguistics.[1][2][3] Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is declarative: the program logic is expressed in terms of relations, represented as facts and rules. A computation is initiated by running a query over these relations.[4] The language was first conceived by a group around Alain Colmerauer in Marseille, France, in the early 1970s and the first Prolog system was developed in 1972 by Colmerauer with Philippe Roussel.[5][6] Prolog was one of the first logic programming languages,[7] and remains the most popular among such languages today, with many free and commercial implementations available. Prolog is well-suited for specific tasks that benefit from rule-based logical queries such as databases searching, voice control systems, and template filling. §Syntax and semantics[edit] §Data types[edit] ? ? ? ?

Robotics Robotics is the branch of mechanical engineering, electrical engineering and computer science that deals with the design, construction, operation, and application of robots,[1] as well as computer systems for their control, sensory feedback, and information processing. These technologies deal with automated machines that can take the place of humans in dangerous environments or manufacturing processes, or resemble humans in appearance, behavior, and/or cognition. Many of today's robots are inspired by nature contributing to the field of bio-inspired robotics. The concept of creating machines that can operate autonomously dates back to classical times, but research into the functionality and potential uses of robots did not grow substantially until the 20th century.[2] Throughout history, robotics has been often seen to mimic human behavior, and often manage tasks in a similar fashion. Etymology[edit] History of robotics[edit] Robotic aspects[edit] Components[edit] Power source[edit]

Declarative programming Common declarative languages include those of database query languages (e.g., SQL, XQuery), regular expressions, logic programming, functional programming, and configuration management systems. Definition[edit] Declarative programming is often defined as any style of programming that is not imperative. A number of other common definitions exist that attempt to give the term a definition other than simply contrasting it with imperative programming. For example: These definitions overlap substantially. Subparadigms[edit] Declarative programming is an umbrella term that includes a number of better-known programming paradigms. Constraint programming[edit] Constraint programming is often used as a complement to other paradigms: functional, logical or even imperative programming. Domain-specific languages[edit] Many markup languages such as HTML, MXML, XAML, XSLT or other user-interface markup languages are often declarative. Functional programming[edit] Hybrid languages[edit] Logic programming[edit]

Bionics Bionics (also known as bionical creativity engineering) is the application of biological methods and systems found in nature to the study and design of engineering systems and modern technology.[citation needed] The transfer of technology between lifeforms and manufactures is, according to proponents of bionic technology, desirable because evolutionary pressure typically forces living organisms, including fauna and flora, to become highly optimized and efficient. Ekso Bionics is currently developing and manufacturing intelligently powered exoskeleton bionic devices that can be strapped on as wearable robots to enhance the strength, mobility, and endurance of soldiers and paraplegics. The term "biomimetic" is preferred when reference is made to chemical reactions. Examples of bionics in engineering include the hulls of boats imitating the thick skin of dolphins; sonar, radar, and medical ultrasound imaging imitating the echolocation of bats. History[edit] Methods[edit] Examples[edit]

Abductive logic programming Abductive logic programming (ALP) is a high level knowledge-representation framework that can be used to solve problems declaratively based on abductive reasoning. It extends normal logic programming by allowing some predicates to be incompletely defined, declared as abducible predicates. Problem solving is effected by deriving hypotheses on these abducible predicates (abductive hypotheses) as solutions of problems to be solved. These problems can be either observations that need to be explained (as in classical abduction) or goals to be achieved (as in normal logic programming). It can be used to solve problems in Diagnosis, Planning, Natural Language and Machine Learning. It has also been used to interpret Negation as failure as a form of abductive reasoning. Syntax[edit] Abductive logic programs have three components, where: Normally, the logic program P does not contain any clauses whose head (or conclusion) refers to an abducible predicate. false:- A1,... Example 1[edit] , has in is: .

Cybernetics Cybernetics is a transdisciplinary[1] approach for exploring regulatory systems, their structures, constraints, and possibilities. Cybernetics is relevant to the study of systems, such as mechanical, physical, biological, cognitive, and social systems. Cybernetics is applicable when a system being analyzed incorporates a closed signaling loop; that is, where action by the system generates some change in its environment and that change is reflected in that system in some manner (feedback) that triggers a system change, originally referred to as a "circular causal" relationship. Some say this is necessary to a cybernetic perspective. Concepts studied by cyberneticists (or, as some prefer, cyberneticians) include, but are not limited to: learning, cognition, adaptation, social control, emergence, communication, efficiency, efficacy, and connectivity. Norbert Wiener defined cybernetics in 1948 as "the scientific study of control and communication in the animal and the machine History[edit]

Inductive logic programming Inductive logic programming (ILP) is a subfield of machine learning which uses logic programming as a uniform representation for examples, background knowledge and hypotheses. Given an encoding of the known background knowledge and a set of examples represented as a logical database of facts, an ILP system will derive a hypothesised logic program which entails all the positive and none of the negative examples. Schema: positive examples + negative examples + background knowledge => hypothesis. Inductive logic programming is particularly useful in bioinformatics and natural language processing. Formal definition[edit] The background knowledge is given as a logical proposition , commonly in the form of Horn clauses used in logic programming. and is a logical proposition satisfying the following requirements.[3] "Necessity" does not impose a restriction on , but forbids any generation of a hypothesis as long as the positive facts are explainable without it. to explain all positive examples . . .

Constraint logic programming As in regular logic programming, programs are queried about the provability of a goal, which may contain constraints in addition to literals. A proof for a goal is composed of clauses whose bodies are satisfiable constraints and literals that can in turn be proved using other clauses. Execution is performed by an interpreter, which starts from the goal and recursively scans the clauses trying to prove the goal. Constraints encountered during this scan are placed in a set called constraint store. If this set is found out to be unsatisfiable, the interpreter backtracks, trying to use other clauses for proving the goal. Overview[edit] Formally, constraint logic programs are like regular logic programs, but the body of clauses can contain constraints, in addition to the regular logic programming literals. Like in regular logic programming, evaluating a goal such as A(X,1) requires evaluating the body of the last clause with Y=1. Semantics[edit] during execution. . to state . to . . Reals[edit]

Answer set programming Answer set programming (ASP) is a form of declarative programming oriented towards difficult (primarily NP-hard) search problems. It is based on the stable model (answer set) semantics of logic programming. In ASP, search problems are reduced to computing stable models, and answer set solvers — programs for generating stable models—are used to perform search. The computational process employed in the design of many answer set solvers is an enhancement of the DPLL algorithm and, in principle, it always terminates (unlike Prolog query evaluation, which may lead to an infinite loop). In a more general sense, ASP includes all applications of answer sets to knowledge representation[1][2] and the use of Prolog-style query evaluation for solving problems arising in these applications. History[edit] The planning method proposed in 1993 by Dimopoulos, Nebel and Köhler[3] is an early example of answer set programming. Answer set programming language AnsProlog[edit] to include in the stable model. .

Related: