













































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
An overview of logic and logic programming, with a particular focus on distributed systems. the basics of logic, including truth and logic axioms, as well as the concept of unification and most general unifier. It also introduces the reader to logic programming, its basic units of computation, and the role of terms, variables, and equality. The document concludes with a discussion on the relevance of logic languages for distributed systems and the concept of and-parallelism in distributed logic programming.
What you will learn
Typology: Study notes
1 / 85
This page cannot be seen from the preview
Don't miss anything!
Distributed Systems / Paradigms Sistemi Distribuiti / Paradigmi
Andrea Omicini andrea.omicini@unibo.it
Dipartimento di Informatica – Scienza e Ingegneria (DISI) Alma Mater Studiorum – Universit`a di Bologna a Cesena
Academic Year 2016/
Outline
(^1) Logic
(^2) Logic Programming
3 Distributed Logic Programming
http://www.britannica.com/topic/logic Logic, the study of correct reasoning, especially as it involves the drawing of inferences.
logic studies the way we draw conclusions and express ourselves, and deals with how to formalise it [Metakides and Nerode, 1996a] it dates back to Aristotle, for whom logic is the instrument for human knowledge [Rijk, 2002]
computational logic (CL) [Lloyd, 1990] is logic in computer science it concerns all uses of logic in computer science: to compute, to represent computation, to reason about computation it is rooted in logic, applied math, artificial intelligence, computer science
starting form a paradox in Cantor’s theory of numbers, Russell’s paradox (the set of all sets that do not belong to themselves) exposed the logical inconsistencies at the foundations of mathematics this made clear that only a rigorous formalisation of mathematics could lead to well-founded mathematical reasoning and theories around 1920, David Hilbert’s program aimed at addressing the issue—to be soon undermined by G¨odel’s Incompleteness Theorems [G¨odel, 1931] the acme of those efforts resulted in the “Principia Mathematica” [Whitehead and Russell, 1927], a complete logic formalisation of all mathematics, finally treated as a whole axiomatic system
“the sum of numbers two and one is three” is a true proposition in any formalisation of arithmetics, whatever symbols we use—the semantic side of truth if “the Snark was a Boojum” [Carroll, 1876] then “something is a Boojum” is a true proposition whatever the meaning of the sentence—the syntax side of truth
Alfred Tarski [Tarski and Tarski, 1994] formalised the notion of logical interpretation as the relation between the symbols (syntax) and the elements of the domain of discourse (semantics) he defined logical entailment (or, logical consequence) precisely: when a conclusion is true in every interpretation making all premises true, then premises logically entail the conclusion—or, the conclusion is a logical consequence of the premises
after Tarski’s work, logic is typically discussed as a two-sided story [Levesque, 2012] a syntactic side involving axioms and rules of inference—sometimes called a proof theory a semantic side involving interpretations and truth—sometimes called a model theory with logical soundness and completeness theorems relating the two sides
To compute we start from a given expression and, according to a fixed set of rules (the program) generate a result. For example, 15 + 26 → (1 + 2 + 1)1 → (3 + 1)1 → 41. To deduce we start from a conjecture and, according to a fixed set of rules (the axioms and inference rules), try to construct a proof of the conjecture. So computation is mechanical and requires no ingenuity, while deduction is a creative process. For example, an^ + bn^6 = cn^ for n > 2 ,... , 357 years of hard work... , QED.
(^1) computation can be seen as a limited form of deduction since it establishes theorems—e.g., 15 + 26 = 41 is both the result of a computation, and a theorem of arithmetic (^2) deduction can be considered a form of computation if we fix a strategy for proof search, removing the guesswork (and the possibility of employing ingenuity) from the deductive process
This latter idea is the foundation of logic programming. Logic program computation proceeds by proof search according to a fixed strategy. By knowing what this strategy is, we can implement particular algorithms in logic, and execute the algorithms by proof search.
a judgement is an object of knowledge—knowing a judgement comes from the evidence we have for it the most common judgement is A true—that is, given a proposition A, A is true ! most of logic programming deals with truth of propositions other judgements are A false – that is, A is false – for true negation A true at t – that is, A is true at time t – the subject of temporal logic K knows A – that is, K knows that A is true – the subject of epistemic logic
if we know J 1 ,... Jn and J^1 ,..., J JnR then we can infer J how do we know, say, J 1? we may know J 1 , 1 ,... J 1 ,n and J^1 ,^1 ,..., J 1 J^1 ,nR 1 , then infer J 1 thus we may build an inference chain to prove J—if possible
given the structure of a deduction, the data structure covering all the possible inference chains for a judgement J is a tree—a proof tree whose root is the conclusion J whose edges are deductions labelled by an inference rule where premises are child nodes, conclusions are parent nodes
... J 1 , 1
J 1 ,n 1
R 1 ,n 1
J 1
Jn, 1
Rn, 1 ,... ,
Jn,nn
Rn,nn
Jn
Rn
J
J is the root of the tree J 1 ,... Jn are nodes of the tree