Science topic

Logic Programming - Science topic

Explore the latest questions and answers in Logic Programming, and find Logic Programming experts.
Questions related to Logic Programming
  • asked a question related to Logic Programming
Question
3 answers
I would like to ask what is the best (the most simple) way to implement a deductive system based on non-monotonic logic (example: can we do this using PROLOG)?
Thanks in advance!
Relevant answer
Answer
Sequent Calculus might work for you.
  • asked a question related to Logic Programming
Question
4 answers
Many approaches propose combined alternatives in this sense. For instance, using logic programing (Prolog), rough sets, and other more joined with models. However, it would be interesting to understand more practical strategies that promote a way of extracting the rules of inferences produced in the tree-based models.
Relevant answer
Answer
  • asked a question related to Logic Programming
Question
6 answers
I am not expert in logic, but I am wondering whether ASP could be a good instrument to face and solve Temporal Logic problems. In many examples I have seen ASP applied to first-order logic... is this extension to the temporal dimension possible?
Relevant answer
Answer
I think ASP can be useful for solve temporal logic programs.
a problem domain can be modeled as ASP rules and temporal logic constraints can be represented as ASP constraints.
then a set of answer sets can be generated where each answer set corresponds to a model of the system. thanks to the  temporal logic constraints, The result will be a set of  answer sets ( i.e. stable models )  where a temporal logic property holds . I have used ASP for a model checking problem in the attached paper. I hope you want it useful.
  • asked a question related to Logic Programming
Question
3 answers
I want to know what is the logic programming and how can combine the characteristics of the logic programming with the constraint satisfaction in any combinatorial problem 
Relevant answer
Answer
Hi Mai,
Very briefly, logic programming is a programming language paradigm which typically expresses properties of inputs and outputs using first-order clausal logics often with extra notations to control evaluation. Each clause specifies that if a finite number of conditions are satisfied then a conclusion is satisfied. Please see examples in the Wikipedia article and well-known texts such as W.F. Clocksin and C.S. Mellish, "Programming in Prolog", Third ed., Springer Verlag, 1987.
Generally, the method of evaluating programs is under-specified and these languages have been described as "declarative" for this reason, e.g. a program to sort lists often can just be read as a specification of a sorted list. This should be compared to imperative languages where each step of a sorting algorithm is encoded explicitly.
In these languages,  unifiability of first-order predicates is used during evaluation. In constraint logic programming, constraints are added to clauses and need to be solvable too.
Regards,
David Wolfram
  • asked a question related to Logic Programming
Question
3 answers
Looking for a programming language that can handle Belnap (four valued) logic.
Relevant answer
Answer
Peter gave very good pointers.
If you need that kind of logic in other high-level programming language like C++, try googling for a library implementing it first.  If you don't find anything, you would need to write your own user defined class based on your chosen logic axioms (or specifications like IEEE). Should you go this way, I strongly suggest that you do it in a Test Driven manner (a la TDD) to cover all cases with tests.
  • asked a question related to Logic Programming
Question
1 answer
Do Xilinx Contraints differ from family to family?
means vertex 5 to vertex 7
Relevant answer
Answer
Yes, they have...
  • asked a question related to Logic Programming
Question
5 answers
I have been developing the first-order reasoner RACE [1] for Attempto Controlled English ACE [2] that allows users to check the consistency of a set of ACE axioms, to deduce ACE theorems from ACE axioms and to answer ACE queries from ACE axioms.
RACE uses a set of auxiliary axioms to express context-independent knowledge like the relation between plural nouns and singular nouns, or the ordering relations of natural numbers. These auxiliary axioms are written in Prolog that – having the power of the Turing machine – allows us to practically do any deduction. Thus often the question is not "Is this deduction correct?", but "Should RACE allow for this deduction?".
In the following I would like to discuss a case where this question arises.
Using the power of Prolog I have extended RACE by auxiliary axioms that perform second-order deductions, concretely aggregation. Thus RACE can deduce
  John is a man. Johnny is a man. ⊢ There are two men.
Adding a further axiom establishing that, in fact, Johnny is John, RACE fails.
  John is a man. Johnny is a man. Johnny is John. ⊬ There are two men.
Thus I have a case of non-monotonic reasoning. (Note that RACE can still deduce that there is one man.)
My question to the community is "Should RACE allow for non-monotonic reasoning, or does non-monotonicity have consequences that could confuse RACE users in more complex cases?"
Relevant answer
Answer
Pierre, I agree that nonmon reasoning can be confusing, but not only for naive users.  Experts never take any kind of reasoning at face value.  They always ask follow-on questions:  What were the assumptions?  Where did the data come from?  How did you derive that answer from those assumptions and that data?
One advantage of FOL theorem provers is the ability to generate an explanation:  Show every step of the proof -- every axiom or data point and every inference.  With controlled NLs, each step can be translated to the same CNL that the user knows.
For nonomon reasoning, belief revision has the same advantage as FOL.  Each revision step can be translated to the CNL.  The final proof is a purely classical FOL proof that can be explained by the above method.
For complex proofs, the amount of detail can be overwhelming, but the expert needs that kind of detail.  Intelligent users who don't have much knowledge of FOL can learn FOL by studying the explanations.  Anyone who is both naive and lazy will always be confused.
  • asked a question related to Logic Programming
Question
6 answers
There are some logic puzzles, for instance Schubert's steamroller (see below), that can be solved by deduction without any additional information. 
There are other logic puzzles, for instance the Zebra puzzle (see below) or the Marathon puzzle (see R. Schwitter) that need problem-specific solution strategies and problem-specific additional information.
I wonder whether there are systematic, more general, ways to solve the puzzles of the second kind.
Relevant answer
Answer
John
Your answer seems to second my statements, namely first that to solve a natural language puzzle you often need – beyond what is explicitly stated in the puzzle – contextual knowledge usually derived from the human sphere, and second that each puzzle requires its own specific contextual knowledge which prevents finding general solutions.
But you are also addressing a second issue, namely the relation between natural language and logic. Having developed Attempto Controlled English – a subset of English that can be translated into logic – I completely agree with you that formal languages are not capable of representing the fullness of natural language. However – again based on my experience with controlled languages – there are cases where natural language texts can be adequately translated into logic and then usefully submitted to logic deduction. Besides the already discussed logical puzzles, examples are technical texts like software specifications, simulations, rule-based systems like clinical practice guidelines, regulations, and ontologies. In each of these cases controlled languages translatable into logic help users who need formal reasoning but are not familiar with formal notations.
I concur with your statement "The boundary between what is part of logic and what belongs to semantics is neither fixed nor clear." In the case of Attempto Controlled English we took this boundary into account by leaving the meaning of the so-called content words (nouns, verbs, adjectives, adverbs) open to the interpretation by the human users.
  • asked a question related to Logic Programming
Question
3 answers
I am looking for a proof such that:
Given a set of Horn clauses, show that there is a unit refutation from S if and only if S is unsatisfiable
Relevant answer
Answer
Resolution, thus unit resolution, is sound. So the "only if" part is immediate.
At the ground level, the "if" part is really easy, but the trick at the first order level is showing that "factoring" is not needed. JACM 21,4 is overkill, but it does this amongst other results.
Intuitively, a ground positive unit proof can be lifted to (a proof of) the first order clauses, of which it is a set of instances, in the usual way -- EXCEPT that a single ground step may correspond to a unit resolution involving a clause in which k literals have been factored together into one. But unification theory allows this one step on a factor  to be replaced by k (unit) steps on the original clause, resulting in the same resolvent produced by the one step with the factor.
(This is mostly intuition and not even a proof sketch.)
  • asked a question related to Logic Programming
Question
12 answers
I am just now interested in explore the capabilities of quantum programming. I found some implementations on literature based on C or C++. Also there is a very promising language QML on top of the functional language Haskell that is based on linear logic, but i'll rather prefer to manage a logic language. Any one know if there is a work on such line?
Relevant answer
Answer
The QPL on Quantiki is a complete nonsense !
This language allows one to dump the "internal state which is diffrent from measurement, since it does not influence the state of the quantum machine and can be realised only using simulator". Note that internal state has no coeficients in any base unles measurement is actually performed (in that base), and then, of course the calculation would be destroyed. Mere existenmce of such states in the computer means terrible reduction of wealth of combinations that quantum computer takes aall into account simultaneously - therefore the calculation is not quantum, and then, of course, the simulaiton will fail at least for some calculations.
The bottom line is that QPL is a language used for programming a Turing machine which then runs some "simulation" in a completely deterministic fashion. If this would succeed we would not need quantum computers, would we ?