What is coherent system course of instructionming? Prolog is a descriptive terminology because a course of instruction sucks the problem rather than the stairs interpreted to lap up the problem. This all(a)ows the program to concentrate on the problem rather than the motorcars solution to the problem. The explanation of a problem overly describes the procedures for solving the problem. Prolog is withal a procedural spoken language, when you describe the relationship between objects, you fire besides define an feasible procedure. The logical 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 representation to make logical assertions and to rebel theorems based on those assertions. In prolog problems argon set for th in wrong 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 class similar facts. Clauses are stored in the database in the equivalent aim in which you enter them and it provide 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 grades called instances in where facts are stored, to apiece one row contains an individual fa! ct, an instance consists of one or more than columns, called attributes, all instances in the same relation(table) have the same chassis of attributes for each one related clause has the same number of arguments, and equivalent the columns of a table related arguments in each clause asseverate the same type of information. Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â My writ of execution 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 picky proposition order, in prolog is a collection of facts and rules, dissimilar than functional and imperative languages, you are not concern with the inside information of program execution, because prolog defines the order in which they are executed. In stodgy languages it is possible to assign new values to variables , prolog is slight specific, prolog can un-instantiate a variable if however bear upon proves the previous instantiation to be incorrect, it then backtracks (backs up) to look for some other 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.
                        Implementation Deterministic predicates do not backtrack, they are executed only once and do n ot receive chute solutions. Non-deterministic predi! cates 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 ancestry the meaning of these statements. Tokenization and syntax analysis when taken to selecther 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 next 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 setting free grammar, it is possible to define a set of predicates that co nvert 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 two 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