Introduction To Logic Programming | Assignment
Added on - 25 Sep 2019
Showing pages 1 to 4 of 11 pages
Introduction to LogicProgramming
2The topic in context here is the introduction toLogic Programming. It is a vast concept withdiverse sets of information regarding the programming language. It would not be possible todelve deep into every aspect of the topic and discuss extensively every topic that pertains to theissue. Hence a quick overview ofLogic Programmingwould be made and almost every aspectrelated to it would be introduced allowing framework for further studies and a current basicunderstanding.The first question that arises is what islogic Programming? Before that is answered thediscussion of anything related to it would not hold any real value.Logic Programmingis a kindof programming paradigm. A number of computer programs are formulated in terms of logicprogramming. It is to be noted that any program which is written in terms oflogicprogrammingconsists of a group of sentences in a logical format. These sentences express a setof facts or rules about some domain of a problem. Besides this, there are a number oflogicprogrammingfamilies that exist. The mentionable ones are Prolog, Answer Set Programmingabbreviated as ASP or Datalog. However, what is common in all these languages is that the rulesin the program are expressed in the form of clauses which is explained in point 1 and are inferredas logical explanations which are explained in point 2.1.H: B1, B2, B3, B4,.......Bn2.H if B1, B2, B3....and BnInlogic programming, H is taken to be the head of the rule. In addition to this, B is known asthe body of the rule. If we look back, the concept of facts has also been raised. Facts, in reality,are the rules which have no bodies. It is demonstrated with just H.
3Logic programmingdoes not always necessary pertain to the simple cases of programming. Asimple case can be considered where the head and body of the rule expressed as H and B1, B2, etcetera are the atomic formulae. In this case, the clauses are named as Horn clauses or Definiteclauses. Besides this, there can be a few other extensions beyond this simple case too. One of themost important of these extensions is that when the clauses are in absolute negation to the atomicformula as discussed above. Consequently, the languages inlogic programmingwhich work inaccordance with these extensions have the capability of representing knowledge in the form ofnon-monotonic logic.A brief detail should also be made about the otherlogic programminglanguages in addition toProlog which includes ASP and Datalog. These programs include a kind of reading which is justdeclarative. In terms of its execution, the process involved is model generator and proofprocedure. However, these processes of execution are not generally under the voluntary controlof the programmer. But if we take into account the Paralog language, it is seen that it has asystem of interpretation which is procedural. It is primarily done as a process of goal reduction.For example, in order to solve the head of the rule which is H, the body of the rule too, includingB1, B2 to Bn, everything has to be solved.History of Logic ProgrammingThe first appearance oflogic programminggoes back to the 1930s, developed by AlonzoChurch, as a feature of the lambda calculus. This was the first use of mathematical logic incomputers sciences. Apart from the developer, Cordell Green was the first one to propose the useof the clausal form of Logic as the representation of computer programs. In 1960-1970, a debatearises about the declarative versus the procedural representation of knowledge about artificial
4intelligence. This is where the current form oflogic programmingcan be traced. The advocatesof each procedure were working in different places. In Stanford, alongside Cordell Green, therewas John McCarthy, Bertram Raphael and in Edinburgh, Alan Robinson, Pat Hayes and RobertKowalski. While the advocates of the procedural representations were in MIT(MassachusettsInstitution of Technology), with Marvin Minsky and Seymour Papert as the head of the study.TechniquesIn widespread discussions aboutlogic programming, a number of aspects have been discussed,including its pros and cons. Consequently, throughout all of these discussions, it has beenestablished that the adoption of a compact and precise as well as formal semantics framework fora programming language inlogic programmingis extremely helpful in terms of understandingthat language. This idea specifically holds good for those languages inlogic programmingwhere the underlying logic puts forward a semantic framework which is well defined but eventhen it is insufficient. In addition to the semantic models supported by models and theories,proof-theoretic deduction plays a paramount role in the inference of logic programs. Therefore,apart from the general implementation, if the specific context oflogic programming, forexample with specific languages, the provision of the strategy of deduction proves to be moreuseful than the others.As a technical approach to the concept oflogic programming, the semantic framework for twospecific kinds oflogic programminglanguages has been taken up at the earnest. Afterdetermining the semantic framework, the applications of these semantic are also discussed. Thetwo languages discussed here are PROLOG and TEMPLOG. The semantics for PROLOGprograms are issued which are most importantly used for forming the basis of the proof-method