Logic Programming in Python4
I'm missing Prolog. Yes, I'm a pythonista now. But I used to be a
- A gentle intro to Prolog: https://bernardopires.com/2013/10/try-logic-programming-a-gentle-introduction-to-prolog/
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
Programming in Prolog
International money transfers? Worldremit beats your bank!
Domains, Hosting? Go Versio!
|[Login to add a comment]|