Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> does "differentiation" have any applications in implementing more complete programming languages?

It seems to: http://matt.might.net/articles/parsing-with-derivatives/



To clarify, the programming language in your link is BNF. Clearly, BNF is a more expressive language than regexp.

I was actually thinking of differentiating whole programs. But still interesting.


A Theory of Changes for Higher-Order Languages - Incrementalizing λ-Calculi by Static Differentiation

> [...] We present a program transformation taking programs to their derivatives, which is fully static and automatic, supports first-class functions, and produces derivatives amenable to standard optimization.

https://arxiv.org/abs/1312.0658


> the programming language in your link is BNF

The programming language follows a context-free grammar (CFG), which has been written in Backus-Naur Form (BNF). It is technically nonsensical to say "the programming language is BNF". It's like if I were to say "English is a Roman language" because we happen to use the Roman letters for our orthography. Just a technical nitpick.

> BNF is a more expressive language than regexp

The context-free languages are more expressive than the regular languages. BNF is a notation for writing a context-free grammar, and regular expressions are a notation for writing regular languages. (Again, a nitpick of terminology.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: