Coder Social home page Coder Social logo

Normalised results output about catala HOT 4 CLOSED

AltGr avatar AltGr commented on July 17, 2024
Normalised results output

from catala.

Comments (4)

AltGr avatar AltGr commented on July 17, 2024

Some more insights related to JSON output — but not to the tests actually:

We want to (and already do) output reusable traces of programs when compiled with --trace ; we already have a printer for them based on JSON that is used for the French benefits visualisation interface. And these traces do include embedded runtime values, which we already have a printer for in the OCaml / JS backend!

So the question could actually be, do we want to extend this trace printing to the other backends, and do we want to make it more accessible or not (e.g. to print computation results) ?
See also my suggestion of using ATD to have a shared definition of this format across backends.

from catala.

pierregoutagny avatar pierregoutagny commented on July 17, 2024

I think it could be quite useful to me to have a normalised output format. However, because I generate input structures as well as output structures, I'm wondering if it would be possible for runtimes to also take input structures as input. Do you think it would be easier for runtimes to take input JSONs or for me to output valid surface language code ?

from catala.

AltGr avatar AltGr commented on July 17, 2024

Definitely we don't want to include a parser in the runtime, which would be much more complex, and doesn't fit with the use-cases we target: catala programs are expected to be run natively as libraries, rather than providing APIs.

Of course, for final needs, one can easily build an API server around the core computation done by Catala; but that should be left to the application as it certainly will need to be specialised for the use-case. We might provide tools for that, but it shouldn't be part of the runtime.

We are actually discussing, for the same reasons, the relevance of JSON output (although most of this discussion was offline), and were leaning against it, but the need for traces might affect the decision.

from catala.

AltGr avatar AltGr commented on July 17, 2024

I think #585 supersedes this, so closing now.

from catala.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.