imitator icon indicating copy to clipboard operation
imitator copied to clipboard

The syntax of unused functions is not checked

Open himito opened this issue 1 year ago • 1 comments

Description

When a function is not used, its syntax is not checked. It is tested in the benchmark 30

Reproduce

./bin/imitator -mode checksyntax  tests/testcases/functions/unused-function-invalid-syntax.imi

The file unused-function-invalid-syntax.imi contains an automaton with a function with syntax errors:

function this_function_does_nothing () : bool
begin
  return this_does_not_exist(some_unknown_variable) + toto * (hello (hello))
end

himito avatar Nov 20 '24 18:11 himito

A clue is the file ModelConverter.ml

https://github.com/imitator-model-checker/imitator/blob/b446b90140cfdf70d496016ea0e6439e7141acbc/src/lib/ModelConverter.ml#L3486

We could try to convert all the functions instead of only the used ones

himito avatar Nov 20 '24 21:11 himito