Question: How to add a new user defined function?
Answer: Follow these steps:
Library changes:
- Define a function class extending FunctionExpr in rapidnet-functions.h/cc Make sure it is generic by taking in arguments of type Expression wherever possible.
- Write test cases in rapidnet/tests/functions-test.cc
Compiler changes:
- Update the function LookupFunction() to map the function name to be used in the NDlog program to its class name in the Library.