Skip to main content

Questions tagged [logic-programming]

Filter by
Sorted by
Tagged with
-2 votes
1 answer
170 views

Question What is a good storage layer, coding paradigm, and query language for computing over realtime data? Use-case For example, stock and options prices are (essentially) realtime data streams. I ...
geofflittle's user avatar
2 votes
1 answer
25k views

I'm planing to use Try/Catch and Database Transaction in Laravel5 and my own PHP project to validate any errors occurs then rollback avoiding lost my transaction or information during user do their ...
Heng Sopheak's user avatar
2 votes
3 answers
859 views

I found this answer on StackOverflow very clear to explain the difference beween the Logic Programming paradigm and the Functional Programming paradigm: The thing that makes logical append different ...
Qqwy's user avatar
  • 4,947
0 votes
1 answer
776 views

I am a relatively new programmer. I can pick up languages and learn syntax at a speed that I consider good, but I can't figure out how to solve problems logically using algorithms very well. I know ...
jklsfdgs's user avatar
2 votes
0 answers
122 views

I have been researching different programming paradigms. I have found a lot of people saying that one of the areas where logic and functional programming are particularly good is programming AI, but I ...
user3787574's user avatar
4 votes
1 answer
161 views

I am running into a situation where my program can have different outcomes depending on the state of some variables. 4 variables are involved and they can all have different ( 3 to 4 different states)....
mbashir's user avatar
  • 143
0 votes
1 answer
220 views

I'm creating an application that sits in the background and records all key presses (currently this is done and working; an event is fired every keydown/keyup). I want to offer a feature for the user ...
Scott's user avatar
  • 123
-1 votes
1 answer
716 views

I am trying to write a program which make the following: ?- g([2,3, [22,[3],9] ,4,[5],99],X). X= [2,3,22,[3],9 ,4,5,99] so it searches for lists in the given list and replace it by their elements ...
user avatar
20 votes
2 answers
5k views

I've heard that logic programming can serve as a general-purpose alternative to other programming paradigms such as OO or functional programming. (Since Prolog is Turing-complete, this must be so!) ...
Alex D's user avatar
  • 1,308
2 votes
1 answer
284 views

Well it's a problem me and my friend had thought of, and well, haven't come up with anything to solve the following problem(I'll try to phrase it in the best way I can): Given that there are n ...
pradyunsg's user avatar
  • 245
9 votes
2 answers
3k views

As a learning exercise (I am not in school - just an old guy trying to learn something new), I am trying to write a logic gate simulation that incorporates propagation delay. The user should also be ...
Neil Mussett's user avatar
8 votes
8 answers
3k views

In a situation like this:" if ((metadata != null) && (metadata.TypeEnum != VariantInfoMetadata.CellTypeEnum.Status)) do you recommend to keep the code as it is above? Or is it better to make ...
Blake's user avatar
  • 839
5 votes
3 answers
1k views

First off, sorry if this is answered somewhere else. I did a brief search, but wasn't sure how to ask in search terms. I'm looking at some code and came across lot's of statements like this: if ( ($...
user127379's user avatar
0 votes
1 answer
2k views

I have had a hard time learning logic programming thus far, and my request for outside resources on this site was met with some opprobrium, so perhaps this question better addresses both my needs and ...
Ben's user avatar
  • 101
15 votes
1 answer
6k views

I've strong interests in Functional and Logic programming and Mercury seems like a good blend of the two. Is it used in industry at all? I'm one to learn a language just for the fun of it but it would ...
user avatar
218 votes
18 answers
109k views

I am considering building an application, which, at its core, would consist of thousands of if...then...else statements. The purpose of the application is to be able to predict how cows move around in ...
3 votes
1 answer
1k views

I would like to make for example imperative programs as output of Prolog (shaders of graphic card) and also event-driven programs (game logic) ... also I would like to learn how to metaprogram in ...
user712092's user avatar
  • 1,412
7 votes
4 answers
3k views

Here is a logical statement: term1 AND (term2 OR term3) OR term4 What is an effective way of storing this information in a data structure? For example, should I use a graph, with a property on each ...
Trindaz's user avatar
  • 195
3 votes
3 answers
770 views

I'm looking for some advice how to get started with Logic programming, and I am really enjoying working through the Scheme book "Structure and Interpretation of Computer Programs." Is there a similar ...
Joshua Aresty's user avatar
13 votes
3 answers
6k views

I have not yet heard about any uses of a logical programming language (such as Prolog) in the software industry, nor do I know of usage of it in hobby programming or open source projects. It (Prolog) ...
Anto's user avatar
  • 11.2k