Live data from Hacker News

A Modern Compiler for the French Tax Code

arxiv.org

131–136 of 136 posts

Re: A Modern Compiler for the French Tax Code

#131
post #64

Earlier quoted context omitted.

I worked in a similar kind of role recently, in a large public retail company. The only advice I'd give would be to lean hard on finding, maturing, and then advertising end-user champions. Cross-department / -traditional boundary products are frustratingly difficult to push top-down, as the leader of the space that "owns" the product (i.e. IT) doesn't directly see the value, because they're not the end user (business…

Quite insightful! Being a part of product teams, I've noticed "platform" teams struggle and the reasons have mostly been not doing what you've pointed out above. As in, instead of working with their customers (i.e., other product teams) to identify their problems and fix them, they would push down their generic platforms down the throat. It invariably didn't end well. I tend to think that platform/framework teams wit…

One can turn it into a flywheel too.

What features should you work on next? The things your users are asking for at your touchbases.

There's a time and place for top-down, but it works best when there are few edge cases. Platform work tends to be a normal distribution with the usual number of "Oh. We never thought anyone would want to do that" tails.

Re: A Modern Compiler for the French Tax Code

#132
post #125

Earlier quoted context omitted.

Again, this points to poor scoping, an imprecise language and a broken system. According to your assertion it's currently impossible for even professionals to know what should be considered in scope. This should be the trivial basis of a legal case, not the difficult and dubious extended research result of paid professionals.

Yes, that is my assertion – it’s impossible to verify that you have considered and correctly interpreted all relevant law, although it should be rare for professionals to make a mistake, especially after extended research. I’m curious as to what makes you think this problem can be solved trivially? Formal verification is hard enough for algorithms over the integers.

Law needs to be rewritten to be efficient and transparent. Logically speaking, the first countries to do so should score major investments and trade bonuses from multinationals. If you have a tinpot dictatorship with US protection or an out of the way novelty country with few useful industries, you could do worse than throw down on this project.

Re: A Modern Compiler for the French Tax Code

#133
post #27

Earlier quoted context omitted.

In a previous job we built an advisor for banking and pensions using a mathematical optimiser solving over a model of the Danish tax rules. It would normally find enough tax savings to retire about a year earlier by finding the best savings strategies (e.g exploiting dynamic and temporal effects between taxation on spouses retiring at different times, using the house mortgage as a savings buffer to shift pension payo…

Where could one read more about this?

It was developed by a Danish startup named Financys, which was acquired by Schantz (another Danish company) and this was later acquired by Keylane from the Netherlands. Unfortunately I don’t think there are any good, detailed information about the technology available any more.

Re: A Modern Compiler for the French Tax Code

#134
post #27

Earlier quoted context omitted.

In a previous job we built an advisor for banking and pensions using a mathematical optimiser solving over a model of the Danish tax rules. It would normally find enough tax savings to retire about a year earlier by finding the best savings strategies (e.g exploiting dynamic and temporal effects between taxation on spouses retiring at different times, using the house mortgage as a savings buffer to shift pension payo…

You should write a blog post or a HN story about that!

I can give a few highlights: it had an exact model of a personal economy (savings, pensions, debt, houses, cars, boats and other assets) and the tax system and a projection engine capable of predicting the future cash flows for a person.

The projections were the basis for advising the client how to best manage their finances.

The advisor model could request an optimisation of how to best allocate the assets and liabilities over time from a mixed integer programming model built with GAMS. The latter optimisation model was not exact but it could generate close-to-optimal strategies for e.g. pension savings, buying houses and how to best spend the savings after retirement. The best strategies were then fed back into the exact model, evaluated and presented to the user.

It requires a pretty complex tax system to really generate a lot of value for the clients so its value was lower in the neighbouring countries that had separated their social systems more from the tax system.

Re: A Modern Compiler for the French Tax Code

#135
post #90

Earlier quoted context omitted.

Does his book actually teach you how to create a DSL using ANTLR and not just and overview? Btw the 2 books of his are almost a decade old, so are they any good now?

Yes, it walks your through it step by step. I have https://pragprog.com/titles/tpantlr2/the-definitive-antlr-4-... and at least 1 more of his, forget where it is. I would say it is ageless (at least, until something better than ANTLR comes along—ohm is promising but not sure what the latest is with that). "The Definitive ANTLR 4 Reference" is absolutely the most understated title I've ever seen in a book. It's really…

Thanks, I'll start reading his book, already have some experience with interpreters and compilers :)

Re: A Modern Compiler for the French Tax Code

#136
post #111
post #99

Earlier quoted context omitted.

Someone did do this - finding discontinuities in the tax law - using formal methods, for the French tax law: https://blog.merigoux.fr/en/2019/12/20/taxes-formal-proofs.h...

He's also the author of the research paper we are discussing.

Oh, oops!
Post reply on HN