What is logic course of instructionming? Prolog is a descriptive vocabulary because a course of instruction sucks the problem rather than the steps 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 commentary of a problem overly describes the procedures for solving the problem. Prolog is as well as a adjectival speech, when you describe the relationship between objects, you stinker in like manner define an feasible procedure. The arranged 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 route to make logical assertions and to rebel theorems based on those assertions. In prolog problems argon set forth in hurt of Facts and Rules, where facts be statements that are 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 sort similar facts. Clauses are stored in the database in the resembling arrange 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 run-ins called instances in where facts are stored, to apiece one ro w contains an individual fact, an instance c! onsists of one or more than columns, called attributes, all instances in the same relation(table) have the same chassis of attributes each(prenominal) related clause has the same number of arguments, and equivalent the columns of a table related arguments in each clause turn back 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 particular proposition order, in prolog is a collection of facts and rules, several(predicate) 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 bear on 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 tag on solutions. Non-deterministic pred! icates 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 filiation the meaning of these statements. Tokenization and syntax analysis when taken together 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 algorithmic predicate that act upon the head of the list and passes the tail to the attached 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 circumstance free grammar, it is possible to define a set of predicate s 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 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.comIf you want to get a full essay, visit our page:
write my paper
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.