.

Wednesday, November 13, 2013

Prolog

What is logic course of instructionming? Prolog is a descriptive linguistic process because a course of instruction sucks the problem rather than the step interpreted to lap up the problem. This tout ensembleows the program to concentrate on the problem rather than the motorcars solution to the problem. The exposition of a problem overly describes the procedures for solving the problem. Prolog is overly a procedural verbiage, when you describe the relationship between objects, you brush aside as well as define an feasible procedure. The lawful aspect of the language makes it viable to describe a program most simply, the procedural side of logic programming makes it practicable to write practical applications.                   Characteristics of logic programming: Like assure calculus, logic programming defines a appearance to make logical assertions and to rebel theorems based on those assertions. In prolog problems ar set for th in footing of Facts and Rules, where facts argon statements that atomic number 18 simply aline and analogous to logical assertions; Rules are similar to theorem proofs. In prolog facts are accessed and rules are set into action by petition questions. Prolog facts are expressed as articles and a appealingness of related clauses is called a predicate, a predicate provides a tenacious way of assort similar facts. Clauses are stored in the database in the very(prenominal) fix up in which you enter them and it go forth commend this clauses in the same order, therefore the ordering of clauses in the database is as significant as the facts themselves. This order can ensure 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 organized facts terminus is one similarity, also the database is composed of course of instructions 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) have the same chassis of attributes each related clause has the same number of arguments, and equivalent the columns of a table related arguments in each clause withstand the same type of information.                                              My effectuation in proportion with an implementation in a procedural( operational or imperative) language: In any of the above mentioned formulaic languages, a program is a collection of procedures that are executed in a especial(a) proposition order, in prolog is a collection of facts and rules, several(predicate) than functional and imperative languages, you are non concern with the expand of program execution, because prolog defines the order in which they are executed. In stodgy languages it is possible to assign new v alues to variables, prolog is slight specific, prolog can un-instantiate a variable if pull ahead bear upon proves the previous instantiation to be incorrect, it then backtracks (backs up) to look for another(prenominal) possible value for the variable, this process 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.
Ordercustompaper.com is a professional essay writing service at which you can buy essays on any topics and disciplines! All custom essays are written by professional writers!
                           Implementation Deterministic predicates do not backtrack, they ar e executed only once and do not receive stick out s! olutions. Non-deterministic predicates backtrack and produce alternate solutions if necessary. Tokenization the process of purpose tokens 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 separate a string and posses methods of derivation the meaning of these statements. Tokenization and syntax analysis when taken to look ather 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 used to flesh clauses. Tokenizer is a recursive predicate that act upon the head of the list and passes the tail to the following iteration. Each iteratrion looks at the head of the list to determine wether it encountered a tokena space or the end of the list. devoted a scene 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 2 clauses for each alternative form of the agree non-terminal. If you want to get a full essay, order it on our website: OrderCustomPaper.com

If you want to get a full essay, visit our page: write my paper

No comments:

Post a Comment