This implements the AGREE support of uninterpreted functions (UF). It is based on Isaac's previous work (branch "uninterpreted-functions"), which implements the UF grammar.
Why?
UF is used in TA6 use case to model complex math functions.
How?
Add UF ("Function") to AST. Previously regular functions defined in AGREE annex are translated as Lustre "Node".
Visit AST to add Jkind Lustre "Function" to AgreeProgram
Visit AST (renaming) to store UF names (function name, I/O argument name)
Process Jkind counterexample. If a UF name is recognized, let it pass to AGREE results.
Reuse Jkind CounterexampleFormatter to display UF in AGREE console .
Nothing special needs to be done for display UF in AGREE Excel view.
Testing?
Preliminary unit testing was done. It includes the following usage:
UF is defined in a separate library.
UF input argument is a record type
UF output argument is a record type
UF is called in another regular function definition
UF is called in a contract
UF is called in a expression
Screenshots (optional)
The table columns may be not fully aligned due to display issue.
FUNCTIONS
ufx ufy | UF_Unit_Test_5.A.uf._outvar.a
----------+-------------------------------
3 1 | 0
3 2 | 0
Display UF in AGREE Eclipse view is not supported. The current implementation (column-driven TreeViewer) of display counterexample in AGREE Eclipse is not compatible with UF natural format (row-driven, symbol row followed by value rows).
What?
This implements the AGREE support of uninterpreted functions (UF). It is based on Isaac's previous work (branch "uninterpreted-functions"), which implements the UF grammar.
Why?
UF is used in TA6 use case to model complex math functions.
How?
Testing?
Preliminary unit testing was done. It includes the following usage:
Screenshots (optional)
The table columns may be not fully aligned due to display issue. FUNCTIONS ufx ufy | UF_Unit_Test_5.A.uf._outvar.a
----------+------------------------------- 3 1 | 0
3 2 | 0
ufx ufy | UF_Unit_Test_5.A.uf._outvar.b
----------+------------------------------- 3 2 | 4
Anything Else?