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
Question
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)?
Sequent Calculus might work for you.
Question
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.
Question
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?
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.
Question
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
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
Question
Looking for a programming language that can handle Belnap (four valued) logic.
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.
Question
Do Xilinx Contraints differ from family to family?
means vertex 5 to vertex 7
Yes, they have...
Question
I have been developing the first-order reasoner RACE  for Attempto Controlled English ACE  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?"
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.
Question
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.
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.
Question
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