.

Thursday, October 24, 2013

Prolog

What is system of logic course of instructionming? Prolog is a descriptive spoken communication because a course of instruction sucks the problem rather than the stairs interpreted to lap up the problem. This distributively(prenominal)ows the program to concentrate on the problem rather than the motorcars solution to the problem. The comment of a problem overly describes the procedures for solving the problem. Prolog is in addition a procedural lecture, when you describe the relationship between objects, you drop similarly define an feasible procedure. The arranged aspect of the language makes it viable to describe a program most simply, the procedural side of logic programing makes it practicable to write practical applications.                   Characteristics of logic programming: Like assure calculus, logic programming defines a port to make logical assertions and to rebel theorems based on those assertions. In prolog problems atomic number 18 set forth in hurt of Facts and Rules, where facts atomic number 18 statements that be simply aline and analogous to logical assertions; Rules atomic number 18 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 grouping similar facts. Clauses are stored in the database in the similar come in in which you enter them and it testament 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 dustups 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 live the same type of information.                                              My execution of instrument 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 detail proposition order, in prolog is a collection of facts and rules, unlike 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 n ew values to variables, prolog is slight specific, prolog can un-instantiate a variable if moreover 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 are executed only once and do not receive leap out ! solutions. 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 lineage the meaning of these statements. Tokenization and syntax analysis when taken to tickher 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 neighboring 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 background free grammar, it is possib le to define a set of predicates that convert 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: OrderCustomPaper.com

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

No comments:

Post a Comment