Stream

Join this community to post or comment

Anne Ogborn
moderator

Discussion  - 
 
Aaargh - looking for a constructive area geometry package for Prolog
1
Add a comment...
 
Hi..
I need code in prolog about only any two of this:

Depth first search
Breadth first search

Uniform cost search
Greedy search

A* search

Iterative deepening search
Limited depth search
"
1
Anders Jackson's profile photo
10 comments
 
The solution is to remember that you store not visited nodes in a list or priority queue and visited nodes in another list. Start by adding start nod/nodes to unvisited nodes list.
Then start recursive part (looping).
Take one nod from the unvisited list and check it isn't visited already. That check is only needed in graphs, not trees. If visited, drop it and loop (recursive step). Locate all children and add them to unvisited list. Visit node and loop. End when reach goal or unvisited list is empty.

The behaivor is decided how you select and remove elements from the empty list.
Add a comment...

Shon Feder

Discussion  - 
 
Here is a request for "Recommended topics to cover for Prolog presentation" to an audience of "primarily senior programmers and architect enterprise in object-oriented imperative paradigms". I will link this G+ post in a comment there too, so it is feasible to offer suggestions as replies to his post if you're not reddit inclined.
I've tentatively agreed to give a talk on Prolog at a local user group for programming. I gave a short 7 minutes lightening talk on Prolog's...
1
Michael Hendricks's profile photo
 
I posted some thoughts on the original Reddit thread.
Add a comment...

Clark Wilson

Discussion  - 
 
Please tell us about the Elgin Works?
 
Launch! Our new SWI-Prolog powered website has gone live!  https://www.toucancolor.com/  
This is the first product to come out of The Elgin Works.
Toucan Laser Baked Color is an advanced coloring agent for laser engraving. Toucan colors liven up laser engraved items, and provide increased contrast that increase sales.
1
Anne Ogborn's profile photo
5 comments
 
it's crazy working on this small scale. Today I've done software engineering, social media marketing, and fabricated a camera holder in the shop so we can do videos. Tomorrow I'll be a film actor and director and then a video editor- not to mention graphic designer, web designer, custodial worker, and who knows what else.
Add a comment...

Rainer Schneckenleitner

Implementations  - 
 
Hello there!
Does somebody know how to flatten a nested term like f(f(f(g(f(x)))))
such that the solution is f(g(f(x)))?
Thanks for your help in advance!
1
Michael Hendricks's profile photoRainer Schneckenleitner's profile photo
7 comments
 
Wow, that is really amazing!!
Thanks for that link!
Add a comment...

Shon Feder

Discussion  - 
 
I just watched the video for Michael's charming presentation, "Production Prolog" (foreshadowed in his [earlier post](https://plus.google.com/113507488402105365870/posts/6qewMbb41Df); it was brought to my attention by /u/mycl's post on /r/prolog).

The presentation features swipl top-level-based presentation slides, a discussions of Mercury, saved states, clp, and concurrency, and presentations of useful SWI-Prolog libraries like library(mavis), and (Michae's own) library(func). His discussion concludes with a candid remark about some of the drawbacks of working with Prolog.

As an aside: I find this kind of humility to be a characteristic of the Prolog community. It's one of the traits that drew me to the language when I was digging around for something novel to study. Without meaning to solicit a bunch of boasting about our humility, I wonder if anyone has thoughts on why Prologers tend in this direction?

A precious jewel of wisdom dropped during the presentation: working with Prolog is like trying to coax a precocious toddler into action through the mere force of reason. Despite appearances, I think that's a quite flattering metaphor!
10
Gage Peterson's profile photo
 
Great talk +Michael Hendricks! 
Add a comment...
 
Late Summer Riddle: Balanced McGregor Graph

What is your favorite Prolog solution to color the following graph by 4 colors, so that the color distribution is 27-27-28-28?
1
Carlo Capelli's profile photoJekejeke Logic Programming's profile photo
2 comments
 
Did not yet found a file or somesuch with the graph. But maybe it can be generated, looks like it has some regularity in it.

Also guess my CLP(FD) cannot solve it, since I don't have yet reification, don't know how to do the counting.
Add a comment...

Josh Cogan

Discussion  - 
 
Hi Everyone...lurker hoping to ask a n00bie question.  As a sw engineer moving more towards accounting, I thought a fun project would be to write up some of the accounting rules into prolog.  Good practice for both.  I was having trouble understanding how to structure some of the rules, and was hoping someone could point me in the right direction.

So far, I can handle the heirarchy of what primitive accounts (like cash) belong to what larger groups (like assets).

//in accounting.pl
isAccount(X) :- isCreditAccount(X).
isAccount(X) :- isDebitAccount(X).
isDebitAccount(cash).
isCreditAccount(accountsPayable).

However I'm having trouble expressing rules like "Assets = Liabilities + Equities".  I think the trouble is that if an account gets bound to some variable X, that account needs to both know its value, and some atom that describes the what kind of account it is.

Sorry if this is confusing, I'm confused.  Thanks for reading!

Josh
2
2
Anders Jackson's profile photoTieson Molly's profile phototodd adler's profile photo
8 comments
 
Remember, you make relations between values. 
So debid/2 is true if account/2 is true.
Add a comment...

Michael Hendricks
moderator

Discussion  - 
 
I'll be speaking at Strange Loop in September on the topic of "Production Prolog".  Do any of you have favorite tips or tricks in Prolog that make you more productive?  I'm trying to show that Prolog is a great language for "getting things done" rather than just solving toy puzzles.

Thanks
9
Lee Render's profile photoTorbjörn Josefsson's profile photo
20 comments
 
+Steven Shaw : No small amount of visio drawings - we've had 200+ big pages, and heaps of excel sheets. We have specialized Visio shapes for different purposes, which improves readability. I'm not big on formal notation, so I'm not sure what the "refactor -> rename" thing means. Ease of use: we eliminated a good bunch (8-10, IIRC) prolog-writing consultants by giving the domain experts (on configuring telephone exchange servers) on Ericsson direct access to the drawing tool.

+Lee Render : Yes, the prolog code which answers the queries is generated from visio+excel.. trying to remake the system in WPF right now. A hassle, but it's going to work, I think :)

Anyone interested in screenshots?
Add a comment...
 
Could you say any prolog which is used in industry or researches? I know about GNU prolog and SWI prolog, but I think that they are too slow for that...
1
Anders Jackson's profile photoTorbjörn Josefsson's profile photo
6 comments
 
We use Sicstus to run business rules for banking, and it works very nicely!
Add a comment...

About this community

The Prolog world is divided into too many armed camps surrounding specific implementations: YAP, SWI, SISCtus, GProlog, etc. This community is a place where anybody interested in Prolog can discuss any dialect of Prolog. (Even weird things like Logtalk!)

Igor Maznitsa

Discussion  - 
 
funny result in SWI-Prolog if to try to prove a non-instantiated variable
?- X.
% ... 1,000,000 ............ 10,000,000 years later
%
%       >> 42 << (last release gives the question)
3
1
Clark Wilson's profile photo
Add a comment...

Juan Bridges

Sticky Posts  - 
 
good night!! hello everybody!
my name is juan bridges and i'm a student of informatical engineering,and i need some help for use of visual prolog  7.5 and the use of events in listbox and buttons,thanks for your help
1
Add a comment...
 
Who let the Dogs out? Development & Minlog on Google Play!

Just uploaded Jekejeke Minlog and Jekejeke Development to Google Play. This is a little experiment in giving these two apps a wider audience. Beforehand these apps were only downloadable from http://www.jekejeke.ch . One has still to go to this website to obtain an evaluation license.

But the apps are now also visible on Google Play. Possibly we might get feedback on how well the apps integrate on the Android platform. Jekejeke Minlog is an extension. Before Jekejeke Minlog can be used one has to either install Jekejeke Runtime or Jekejeke Development or both. Jekejeke Minlog itself will not show a run icon on the Android desktop, instead the Runtime or the Development will allow loading it.

Besides testing the extension mechanism on a greater scale, we might gradually move from this testing stage to more mature apps and possibly a better integration with Google Play. For the moment the icon of the apps on Google Play will be marked with "Beta" to indicate that this stage has not yet been reached.

Happy Coding!

Jekejeke Minlog on Google Play
https://play.google.com/store/apps/details?id=jekmin.platform.headless

Jekejeke Development on Google Play
https://play.google.com/store/apps/details?id=jekdev.platform.headless
1
Add a comment...

Anne Ogborn
moderator

Discussion  - 
 
Launch! Our new SWI-Prolog powered website has gone live!  https://www.toucancolor.com/  
This is the first product to come out of The Elgin Works.
Toucan Laser Baked Color is an advanced coloring agent for laser engraving. Toucan colors liven up laser engraved items, and provide increased contrast that increase sales.
5
1
Clark Wilson's profile photo
Add a comment...
 
Autumn Riddle: Chicken Sale

"Three farmers were selling chickens at the local market.  One farmer had 10 chickens to sell, another had 16 chickens to sell, and the last had 26 chickens to sell.  In order not to compete with each other, they agreed to all sell their chickens at the same price.  But by lunchtime, they decided that sales were not going so well, and they all decided to lower their prices to the same lower price point.  By the end of the day, they had sold all their chickens.  It turned out that they all collected the same amount of money, $35, from the day's chicken sales.  What was the price of the chickens before lunchtime and after lunchtime?"

What is your favorite Prolog solution?

P.S.: Found by way of +Terence Tao 
1
Anh Mather's profile photo
 
ha ha ! in the USA, this price fixing activities are illegal. Hence this problem is false!
Add a comment...
 
Jekejeke Prolog: Going Partial Opern Source

Dear All,

We are gradually open sourcing a lot of the infrastructure and common code of Jekejeke Prolog. The following modules have already been uploaded to the public:

Language:
The core language, 15 files
Frequent:
Frequent predicates, 37 files

Hope this helps in further development of the system. At least it is now possible to inspect a great deal of the source, and also learn a lot about how to use the API.

Enjoy!

Jekejeke Prolog: Source Department
http://www.jekejeke.ch/idatab/doclet/blog/en/docs/05_run/package.jsp

Jekejeke Prolog: Google Play
https://play.google.com/store/apps/details?id=jekpro.platform.headless
1
Add a comment...

Dave McKay

Discussion  - 
 
Hey folks, thanks for letting me in. I'm a long time (35 years, 20+ as a professional) programmer, old-school hard-core C, looking at Prolog for the first time. Man, what a head-bend. Expect a lot of newbie questions!
4
Michael Hendricks's profile photoDave McKay's profile photo
2 comments
 
+Michael Hendricks Thanks.
Add a comment...

Clark Wilson

Discussion  - 
 
I looked at this and thought that it could be a fun thing to play around with, though I haven't a clue what in particular one might do. One query might be -- which entity (if any) has only enemies? (i.e., only red markers) But it seems one ought to be able to, say, evaluate the plausibility of proposed scenarios for new Tom Clancy books, or identify less rigid areas to try to broker agreements in (turn yellows into greens). Dunno.

http://www.slate.com/blogs/the_world_/2014/07/17/the_middle_east_friendship_chart.html
With overlapping civil wars in Syria and Iraq, a new flare-up of violence between Israel and the Palestinians, and tense nuclear talks with Iran, Middle Eastern politics are more volatile than ever and longtime alliances are shifting. Here's a guide to who's on whose side in the escalating chaos. Click...
4
Add a comment...
 
Jekejeke Minlog Desktop Installation

A short video showing how to use Jekejeke Minlog on the desktop. The video shows the discovery of capabilities that are placed in the apk folder, which makes the installation quite easy. The video also shows that there is still some work ahead to integrate the constraint solver and the debugger.

Jekejeke Prolog: Download Page
http://www.jekejeke.ch/idatab/doclet/prod/en/docs/package.jsp

Jekejeke Minlog: Finite Domain Constraint Solver
http://www.jekejeke.ch/idatab/doclet/prod/en/docs/15_min/10_docu/02_reference/07_theory/02_finite/package.html
1
Add a comment...
 
Thank you for add me to the community, my name's Jose and I'm studying at university.
I'm working in a project about psychological test and I need to connect with PHP.
So my question is, how I call to prolog with php from windows S.O.?
2
Sebastian Krings's profile photoJOSE LUIS SAENZ ROMERO's profile photo
16 comments
 
Ok, thanks very much...
Add a comment...