New backend to generate C code for computing invariants. This should work with either the hand-written invariants or those synthesized from the dimensional analysis (see, e.g., #358). The generated C code should be generic. As a guide to what "generic" is, the source file should be compilable into an object file, from the command line, using gcc -c with no platform dependence. (NOTE: compilable into an object file, not into a binary, since it will have no main().) It will be linked together with embedded firmware (e.g., on Warp) which will feed the functions with the appropriate signals (e.g., velocity computed from acceleration, etc.).
float
computeDragForceInvariant(float viscosity, float velocity...)
{
...
/*
* function to compute the value of the invariant
*/
return invariantValue;
}
New backend to generate C code for computing invariants. This should work with either the hand-written invariants or those synthesized from the dimensional analysis (see, e.g., #358). The generated C code should be generic. As a guide to what "generic" is, the source file should be compilable into an object file, from the command line, using
gcc -c
with no platform dependence. (NOTE: compilable into an object file, not into a binary, since it will have nomain()
.) It will be linked together with embedded firmware (e.g., on Warp) which will feed the functions with the appropriate signals (e.g., velocity computed from acceleration, etc.).See comments here https://github.com/phillipstanleymarbell/Noisy-lang-compiler/issues/354#issuecomment-418620426 and here https://github.com/phillipstanleymarbell/Noisy-lang-compiler/pull/301#issuecomment-409131120 for a guide on how to add a new backend/pass into the compiler.