Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip: convert unused functions #204

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .github/patches/oasis-config.patch

This file was deleted.

5 changes: 0 additions & 5 deletions .github/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ eval $(opam env)
# instal ppl
[ ! -d "$(opam var lib)/ppl" ] && bash "${SCRIPT_FOLDER}/install-ppl.sh"

# patch oasis for OSX
if [[ "$RUNNER_OS" = "macOS" ]]; then
patch -p0 <"${PATCH_FOLDER}/oasis-config.patch"
fi

# Build IMITATOR
dune build

Expand Down
12 changes: 7 additions & 5 deletions src/lib/DiscreteExpressionConverter.ml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ let check_seq_code_bloc_assignments variable_infos code_bloc_name seq_code_bloc
(* let has_clock_updated_with_non_linear = List.length assigned_clocks_with_non_linear_expr > 0 in*)
(* Is any non-linear operation found on continuous variables (clock / parameter) *)
let has_nonlinear_operation_on_continuous = List.length nonlinear_operation_on_continuous > 0 in

(* Print errors *)

List.iter (fun variable_name ->
Expand Down Expand Up @@ -339,10 +339,6 @@ let check_seq_code_bloc variable_infos code_bloc_name seq_code_bloc =

(* Check if user function definition is well formed *)
let check_fun_definition variable_infos (fun_def : parsed_fun_definition) =

(* Get code bloc and return expression of the function *)
let code_bloc, return_expr_opt = fun_def.body in

(* Check if all variables in function definition are defined *)
let is_all_variables_defined =

Expand Down Expand Up @@ -378,6 +374,12 @@ let check_fun_definition variable_infos (fun_def : parsed_fun_definition) =

in

if not (is_all_variables_defined && is_all_functions_defined) then
raise InvalidModel;

(* Get code bloc and return expression of the function *)
let code_bloc, return_expr_opt = fun_def.body in

(* Check if there isn't duplicate parameter with inconsistent types *)
let is_consistent_duplicate_parameters =

Expand Down
Loading
Loading