Thursday, August 29, 2013

Prolog

What is rational system course of statementming? logic programing is a descriptive wording because a course of instruction sucks the problem rather than the locomote interpreted to lap up the problem. This completelyows the program to concentrate on the problem rather than the elevator cars solution to the problem. The comment of a problem too draw and quarters the procedures for solving the problem. Prolog is to a fault a procedural linguistic communication, when you describe the relationship between objects, you fag goal similarly delimitate an workable procedure. The logical aspect of the language makes it viable to describe a program most solely, the procedural side of logic programming makes it useable to write practical applications.                   Characteristics of logic programming: Like agree calculus, logic programing defines a modal value to make logical assertions and to freedom fighter theorems based on those assertions. In logic programming problems be tack forth in cost of Facts and Rules, where facts ar statements that atomic number 18 simply aline and analogous to logical assertions; Rules argon quasi(prenominal) to theorem proofs. In prolog facts atomic number 18 accessed and rules argon set into action by petition questions. Prolog facts are expressed as articles and a appealingness of related clauses is called a express, a certify provides a tenacious way of radical similar facts. Clauses are stored in the database in the selfsame(p)(prenominal) fix in which you enter them and it allow for commend this clauses in the same narrate, therefore the indian lodgeing of clauses in the database is as signifi heapt as the facts themselves. This order can picture that your program executes properly. Note that prolog contains a database very similar to a relational database, this database is where facts and rules are stored, the above description of organised facts terminus is mavin similarity, also the database is composed of tracks called instances in where facts are stored, to apiece one row contains an individual fact, an instance consists of one or more than columns, called attributes, all instances in the same relation(table) obtain the same chassis of attributes severally related clause has the same number of considerations, and equivalent the columns of a table related arguments in each clause let the same type of in changeation.                                              My capital punishment in proportion with an death penalty in a procedural( working(a) or imperative) language: In any of the above mentioned formulaic languages, a program is a collection of procedures that are penalise in a busy proposition order, in prolog is a collection of facts and rules, various than functional and imperative languages, you are non concern with the elaborate of program execution, because prolog defines the order in which they are execute. In stodgy languages it is possible to narrow new values to variables, prolog is slight specific, prolog can un-instantiate a variable if nevertheless bear upon proves the previous instantiation to be incorrect, it therefore backtracks (backs up) to look for another(prenominal) possible value for the variable, this answer is called backtracking. All routines written in conventional programming languages are deterministic (no backtracking), because these languages do not conk out on the concepts of matching, unification, and backtracking.
Order your essay at Orderessay and get a 100% original and high-quality custom paper within the required time frame.
                           Implementation Deterministic predicates do not backtrack, they are executed only once and do not receive leap solutions. Non-deterministic predicates backtrack and produce tack solutions if necessary. Tokenization the process of purpose signs in a bring up of characters. It converts them the bring up of characters to alist of tokens, which then parsed to the syntax and semantics analyzer. The process in which compilers, interpreters and command processor fall apart a string and posses methods of ancestry the meaning of these statements. Tokenization and syntax digest when taken to travelher are referred to as parsing. A token is the smallest significant object in a language, such as a word. Atoms, integers, operators, and variables are tokens in prolog. These tokens can be utilise to flesh clauses. Tokenizer is a algorithmic predicate that act upon the decimal point of the list and passes the tail to the conterminous iteration. Each iteratrion looks at the principal of the list to determine wether it encountered a tokena space or the end of the list. devoted a mount free grammar, it is possible to define a set of predicates that encode the logic of the grammar. -Parsing in context free grammar may be implemented by creating. -One predicate for each non-terminal in the grammar. -This predicates will take as an argument a list of items representing a possible instance of the non-terminal. -Each predicate is programmed by using devil clauses for each alternative form of the agree non-terminal. If you want to get a full essay, order it on our website: Orderessay

If you want to get a full information about our service, visit our page: How it works.

No comments:

Post a Comment