[new] [Python 3.x]

Logic Programming in Python4

I'm missing Prolog. Yes, I'm a pythonista now. But I used to be a Prologisto.

Python is nice and forgiving. You ask for: Procedural, Functional, Objective, DataScience, ComputerVision, NLP. Whatever your needs, Python will serve you with grace. However, there is a missing link: logic!

Prolog - logic programming

That's why I propose the following "embedded Prolog" extension to Python4. Meet ProPy:

class Prolog(Logic):
    def __init__(Me):
        pass
    def add_code(Me, Some_prolog_code):
        pass
    def prove_goal(Me, Prolog_code2Prove):
        pass

ProPy at work

`` p=Prolog() errors = p.add_code(''' will_perish(X) :- human(X). human("donald"). human("khomeini"). human("hilary"). ')

conclusions = p.prove_goal(' will_perish(X). ''')

>> conclusions 'X=["donald","khomeini","hilary"]

Prolog for Dummies

  • TODO

Programming in Prolog

( by kred to Pythonistas&Prologistos at 2017-09-10 23:46:25 in Python 3.x )

International money transfers? Worldremit beats your bank!

Domains, Hosting? Go Versio!

[Login to add a comment]
[new]