Lurker News
What are you learning right now? My last side project was recently derailed and I am curious to hear what other people are spending their time studying/learning about.

Comments (876) 381 threads

Show all comments

Showing thread 32 of 381

koeng5 replies#
Prolog. I think that genetic logic can largely be expressed in Prolog to enable doing some crazy stuff that hasn’t been explored yet. It’s crazy to me that synthetic biology hasn’t really used logical programming yet for gene design.
biot1 reply#
I’m fascinated by what this might look like. Have you written anything on this concept?
koeng#
Not yet, I was in the middle of building a script to convert metacyc (https://metacyc.org/) to a Prolog database when COVID-19 hit - now I'm distracted figuring out the logistics of doing local production of diagnostic enzymes.

I've written something for the biotech crowd (to get DNA synthesis from FreeGenes), so it uses some odd vernacular and definitely isn't perfect for tech crowd - no actual code implementing it yet, but has some useful historical context of how this lands in with everything else.
https://docs.google.com/document/d/1odf8q7ir9NsS0zPvArEg0j0W...

Twisol3 replies#
Logic programming is badly underapplied in general, I think. Most of the amazing work in this area never seems to have gotten far out of academia (if at all) -- Prolog being the almost singular exception.

Would be awesome to see some motivating examples for this application. It sounds really cool!

koeng#
In synthetic biology, the application is super clear.

Let's say we want to make cocaine (or related compounds) in yeast (https://www.nature.com/articles/s41467-019-11588-w). Well, we know the biosynthetic pathway to get to that molecule (https://biocyc.org/META/new-image?type=PATHWAY&object=PWY-58...), and we know the biosynthetic pathways in yeast that intersect with that pathway.
In the tropane paper, they express 15 new genes and did 7 disruptions.
There should be a way to declare "I want this end product" and a system knowledgeable about the proteins associated with the reactions necessary to get there should be able to fit the puzzle of "ok, if you express these proteins you get that end product, and if you knock down these genes in the organism it should increase your production".
This generalized system should be applicable to nearly any biosynthetic pathway, and I think there is definitely a profitable niche at being good at that.

vfinn1 reply#
Could you shed some more light on this amazing work you're talking about?
Twisol#
Sure. First, I'd recommend checking out the website of HN user 'triska at https://www.metalevel.at/prolog -- there's more to Prolog itself than most people are ever made aware of.

Frank Pfenning at CMU does some really cool research on concurrency using logical semantics and sequent calculi (https://www.cs.cmu.edu/~fp/). Session types might be the coolest thing out of this particular corner of the field, but there's so much more to explore here.
Going back some decades, concurrent constraint programming (CCP) takes the position that concurrent processes communicate by posting constraints upon a shared store. Vijay Saraswat's ask/tell CCP model has been a real inspiration to me. As best as I can tell, his work is based on forward reasoning, as opposed to Prof. Pfenning's work, which appears to use backwards reasoning (as does Prolog). (There's an interesting duality between the two kinds of reasoning, which I am not at all positioned to opine on.)
Some of the functional work I've seen on concurrency ends up going in a logical direction without realizing it; the more recent LVars papers (Lindsey Kuper and Ryan Newton) build up a lovely abstraction in Haskell that's conceptually the same as Saraswat's ask/tell logical framework, but they don't seem to realize it until several papers in. (It's all fantastic work! It's just a shame the communities have so little overlap.)
Logic programming allows you to model mutable state, and it gives you high-powered tools to reason about how that state changes over time. As a concrete example, you only need term unification and logical variables to get undirected communication channels in a logic program. Unifying a variable with a term in one part of the program allows other users of the variable to match on it and obtain information about that term. In this sense, it goes in the complete opposite direction from functional programming, which eschews state and treats it as something to be derived from a stateless foundation.

codekilla1 reply#
Yeah, checkout Maude--really woefully underutilized. Some fascinating things around pathway logic that are applied to biology: http://pl.csl.sri.com
koeng2 replies#
That's amazing! I've never found that site before but I'm going to read some of their papers. Thank you for linking

Continue this thread — 2 replies

tobmlt1 reply#
Have you any thoughts on medikanren? I think they are generally _thinking_ as you do but in the short term that project is more about searching medical knowledge bases as opposed to logical programming of/with genes.
koeng1 reply#
I can't find that much information about it online, but it looks great from a outside perspective! Wish they had a paper or something.
will_byrd1 reply#
Me too. We'll write one soon. Right now we are hacking on mediKanren to do drug re-purposing for COVID-19.

I also work on miniKanren and am very interested in synthentic biology. We should talk! Please email me.
--Will

Continue this thread — 1 reply

emmanueloga_2 replies#
Cool. This subject is on my list and will probably approach it through Clojure's Core.Logic (a logic library inspired by both prolog and miniKanren) [1]

1: https://github.com/clojure/core.logic

gotts1 reply#
Have you checked pldb/db-rel from core.logic?
emmanueloga_#
I haven't started checking the library yet... But I have it on my radar, since I'm already doing clojure I feel like it is an easy way to "add some prolog" to my programs :-)
koeng1 reply#
I've heard Datomic was made by Clojure people and is really good software too, though unfortunately proprietary.
koeng#
Thanks! Signed up.