Project

General

Profile

Revision a1daa793

View differences:

AUTHORS
1 1
Pierre-Loïc Garoche - ONERA, France
2 2
Xavier Thirioux - ENSEEIHT/INPT, France
3
Temesghen Kahsai - NASA Ames / CMU, US
4

  
3
Temesghen Kahsai - CMU/NASA, USA
5 4
Inital Typing/Clocking by Julien Forget - LIFL, France
autom4te.cache/output.0
1 1
@%:@! /bin/sh
2 2
@%:@ Guess values for system-dependent variables and create Makefiles.
3
@%:@ Generated by GNU Autoconf 2.69 for lustrec 1.0-Unversioned directory.
3
@%:@ Generated by GNU Autoconf 2.69 for lustrec 1.1-Unversioned directory.
4 4
@%:@
5 5
@%:@ Report bugs to <ploc@garoche.net>.
6 6
@%:@ 
......
579 579
# Identity of this package.
580 580
PACKAGE_NAME='lustrec'
581 581
PACKAGE_TARNAME='lustrec'
582
PACKAGE_VERSION='1.0-Unversioned directory'
583
PACKAGE_STRING='lustrec 1.0-Unversioned directory'
582
PACKAGE_VERSION='1.1-Unversioned directory'
583
PACKAGE_STRING='lustrec 1.1-Unversioned directory'
584 584
PACKAGE_BUGREPORT='ploc@garoche.net'
585 585
PACKAGE_URL=''
586 586

  
......
1179 1179
  # Omit some internal or obsolete options to make the list less imposing.
1180 1180
  # This message is too long to be a string in the A/UX 3.1 sh.
1181 1181
  cat <<_ACEOF
1182
\`configure' configures lustrec 1.0-Unversioned directory to adapt to many kinds of systems.
1182
\`configure' configures lustrec 1.1-Unversioned directory to adapt to many kinds of systems.
1183 1183

  
1184 1184
Usage: $0 [OPTION]... [VAR=VALUE]...
1185 1185

  
......
1240 1240

  
1241 1241
if test -n "$ac_init_help"; then
1242 1242
  case $ac_init_help in
1243
     short | recursive ) echo "Configuration of lustrec 1.0-Unversioned directory:";;
1243
     short | recursive ) echo "Configuration of lustrec 1.1-Unversioned directory:";;
1244 1244
   esac
1245 1245
  cat <<\_ACEOF
1246 1246

  
......
1314 1314
test -n "$ac_init_help" && exit $ac_status
1315 1315
if $ac_init_version; then
1316 1316
  cat <<\_ACEOF
1317
lustrec configure 1.0-Unversioned directory
1317
lustrec configure 1.1-Unversioned directory
1318 1318
generated by GNU Autoconf 2.69
1319 1319

  
1320 1320
Copyright (C) 2012 Free Software Foundation, Inc.
......
1331 1331
This file contains any messages produced by compilers while
1332 1332
running configure, to aid debugging if configure makes a mistake.
1333 1333

  
1334
It was created by lustrec $as_me 1.0-Unversioned directory, which was
1334
It was created by lustrec $as_me 1.1-Unversioned directory, which was
1335 1335
generated by GNU Autoconf 2.69.  Invocation command line was
1336 1336

  
1337 1337
  $ $0 $@
......
2401 2401
# report actual input values of CONFIG_FILES etc. instead of their
2402 2402
# values after options handling.
2403 2403
ac_log="
2404
This file was extended by lustrec $as_me 1.0-Unversioned directory, which was
2404
This file was extended by lustrec $as_me 1.1-Unversioned directory, which was
2405 2405
generated by GNU Autoconf 2.69.  Invocation command line was
2406 2406

  
2407 2407
  CONFIG_FILES    = $CONFIG_FILES
......
2454 2454
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
2455 2455
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
2456 2456
ac_cs_version="\\
2457
lustrec config.status 1.0-Unversioned directory
2457
lustrec config.status 1.1-Unversioned directory
2458 2458
configured by $0, generated by GNU Autoconf 2.69,
2459 2459
  with options \\"\$ac_cs_config\\"
2460 2460

  
autom4te.cache/requests
14 14
                        'configure.ac'
15 15
                      ],
16 16
                      {
17
                        '_LT_AC_TAGCONFIG' => 1,
18
                        'AM_PROG_F77_C_O' => 1,
19
                        'AC_INIT' => 1,
20
                        'm4_pattern_forbid' => 1,
21
                        '_AM_COND_IF' => 1,
22
                        'AC_CANONICAL_TARGET' => 1,
23
                        'AC_SUBST' => 1,
24
                        'AC_CONFIG_LIBOBJ_DIR' => 1,
25
                        'AC_FC_SRCEXT' => 1,
26
                        'AC_CANONICAL_HOST' => 1,
27
                        'AC_PROG_LIBTOOL' => 1,
28
                        'AM_INIT_AUTOMAKE' => 1,
29
                        'AM_PATH_GUILE' => 1,
30
                        'AC_CONFIG_SUBDIRS' => 1,
31
                        'AM_AUTOMAKE_VERSION' => 1,
17 32
                        'LT_CONFIG_LTDL_DIR' => 1,
18
                        'AC_FC_FREEFORM' => 1,
19
                        'm4_pattern_allow' => 1,
20
                        'AM_SILENT_RULES' => 1,
21
                        'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
33
                        'AC_REQUIRE_AUX_FILE' => 1,
34
                        'AC_CONFIG_LINKS' => 1,
35
                        'm4_sinclude' => 1,
22 36
                        'LT_SUPPORTED_TAG' => 1,
23
                        'AC_CONFIG_FILES' => 1,
24
                        'AM_PROG_MOC' => 1,
25
                        'AH_OUTPUT' => 1,
37
                        'AM_MAINTAINER_MODE' => 1,
38
                        'AM_NLS' => 1,
26 39
                        'AC_FC_PP_DEFINE' => 1,
27
                        'AC_CANONICAL_SYSTEM' => 1,
28
                        'AC_PROG_LIBTOOL' => 1,
40
                        'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
41
                        'AM_MAKEFILE_INCLUDE' => 1,
29 42
                        '_m4_warn' => 1,
30
                        'AC_SUBST_TRACE' => 1,
31
                        'AC_CANONICAL_TARGET' => 1,
32
                        'AM_POT_TOOLS' => 1,
33
                        'm4_include' => 1,
34
                        'AM_MAINTAINER_MODE' => 1,
43
                        'AM_PROG_CXX_C_O' => 1,
44
                        '_AM_COND_ENDIF' => 1,
45
                        '_AM_MAKEFILE_INCLUDE' => 1,
46
                        'AM_ENABLE_MULTILIB' => 1,
47
                        'AM_SILENT_RULES' => 1,
48
                        'AM_PROG_MOC' => 1,
49
                        'AC_CONFIG_FILES' => 1,
35 50
                        'include' => 1,
36
                        'AC_CANONICAL_BUILD' => 1,
37 51
                        'LT_INIT' => 1,
38
                        'AM_GNU_GETTEXT' => 1,
39
                        'AC_REQUIRE_AUX_FILE' => 1,
40
                        'AM_INIT_AUTOMAKE' => 1,
41
                        '_AM_COND_ELSE' => 1,
42
                        'm4_sinclude' => 1,
43 52
                        'AM_PROG_AR' => 1,
44
                        'AM_PROG_CC_C_O' => 1,
45
                        'AM_PROG_F77_C_O' => 1,
46
                        '_LT_AC_TAGCONFIG' => 1,
47
                        'AM_MAKEFILE_INCLUDE' => 1,
53
                        'AM_GNU_GETTEXT' => 1,
54
                        'AC_LIBSOURCE' => 1,
55
                        'AM_PROG_FC_C_O' => 1,
56
                        'AC_CANONICAL_BUILD' => 1,
57
                        'AC_FC_FREEFORM' => 1,
58
                        'AH_OUTPUT' => 1,
48 59
                        'AC_FC_PP_SRCEXT' => 1,
60
                        '_AM_SUBST_NOTMAKE' => 1,
61
                        'AC_CONFIG_AUX_DIR' => 1,
49 62
                        'sinclude' => 1,
50
                        'AM_PROG_FC_C_O' => 1,
51
                        'AC_CONFIG_LIBOBJ_DIR' => 1,
52
                        'AM_PROG_CXX_C_O' => 1,
53
                        'AC_CONFIG_SUBDIRS' => 1,
54
                        'm4_pattern_forbid' => 1,
55
                        'AC_LIBSOURCE' => 1,
56
                        'AC_INIT' => 1,
63
                        'AM_PROG_CC_C_O' => 1,
64
                        'm4_pattern_allow' => 1,
57 65
                        'AM_XGETTEXT_OPTION' => 1,
58
                        'AC_CANONICAL_HOST' => 1,
59
                        'AC_FC_SRCEXT' => 1,
60
                        '_AM_SUBST_NOTMAKE' => 1,
61
                        'AM_PATH_GUILE' => 1,
62
                        'AC_CONFIG_LINKS' => 1,
63
                        'AC_SUBST' => 1,
64
                        'AM_AUTOMAKE_VERSION' => 1,
65
                        'AM_NLS' => 1,
66
                        'AM_ENABLE_MULTILIB' => 1,
67
                        'AC_CONFIG_HEADERS' => 1,
68
                        '_AM_COND_ENDIF' => 1,
69
                        '_AM_MAKEFILE_INCLUDE' => 1,
66
                        'AC_CANONICAL_SYSTEM' => 1,
70 67
                        'AM_CONDITIONAL' => 1,
68
                        'AC_CONFIG_HEADERS' => 1,
71 69
                        'AC_DEFINE_TRACE_LITERAL' => 1,
72
                        'AC_CONFIG_AUX_DIR' => 1,
73
                        '_AM_COND_IF' => 1
70
                        'AM_POT_TOOLS' => 1,
71
                        'm4_include' => 1,
72
                        '_AM_COND_ELSE' => 1,
73
                        'AC_SUBST_TRACE' => 1
74 74
                      }
75 75
                    ], 'Autom4te::Request' )
76 76
           );
autom4te.cache/traces.0
1
m4trace:configure.ac:2: -1- AC_INIT([lustrec], [1.0-svnversion], [ploc@garoche.net])
1
m4trace:configure.ac:2: -1- AC_INIT([lustrec], [1.1-svnversion], [ploc@garoche.net])
2 2
m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?A[CHUM]_])
3 3
m4trace:configure.ac:2: -1- m4_pattern_forbid([_AC_])
4 4
m4trace:configure.ac:2: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
......
167 167
m4trace:configure.ac:84: -1- m4_pattern_allow([^abs_datadir$])
168 168
m4trace:configure.ac:84: -1- AC_DEFINE_TRACE_LITERAL([abs_datadir])
169 169
m4trace:configure.ac:84: -1- m4_pattern_allow([^abs_datadir$])
170
m4trace:configure.ac:90: -1- AC_CONFIG_FILES([Makefile
170
m4trace:configure.ac:87: -1- AC_CONFIG_FILES([Makefile
171 171
		 src/Makefile
172 172
                 src/myocamlbuild.ml
173 173
		 src/version.ml])
configure.ac
1 1
define([svnversion], esyscmd([sh -c "svnversion|sed "s/:.*//"|tr -d '\n'"]))dnl
2
AC_INIT([lustrec], [1.0-svnversion], [ploc@garoche.net])
2
AC_INIT([lustrec], [1.1-svnversion], [ploc@garoche.net])
3 3

  
4 4

  
5 5
AC_DEFINE(SVN_REVISION, "svnversion", [SVN Revision])
share/FindLustre.cmake
15 15
# The module defines some functions:
16 16
#   Lustre_Compile([NODE <Lustre Main Node>]
17 17
#                  LUS_FILES <Lustre files>
18
#                  [USER_C_FILES <C files>])
18
#                  [USER_C_FILES <C files>]
19
#                  [VERBOSE <level>]
20
#                  LIBNAME <libraryName>)
21
#
22
# When used the Lustre_Compile macro define the variable
23
# LUSTRE_GENERATED_C_FILES_<libraryName> in the parent scope
24
# so that the caller can get (if needed) the list of Lustre generated files.
25
# The VERBOSE level is a numeric value passed directly to the -verbose
26
# command line option of the lustre compiler
19 27
#
20 28

  
21 29
if(LUSTRE_PATH_HINT)
......
65 73
include(CMakeParseArguments)
66 74
function(Lustre_Compile)
67 75
  set(options "")
68
  set(oneValueArgs NODE LIBNAME)
76
  set(oneValueArgs NODE LIBNAME VERBOSE)
69 77
  set(multiValueArgs LUS_FILES USER_C_FILES)
70 78
  cmake_parse_arguments(LUS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
71 79

  
......
81 89
    set(LUSTRE_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/lus_${LUS_LIBNAME}")
82 90
  endif()
83 91

  
92
  if (LUS_VERBOSE)
93
    set(LUSTRE_VERBOSE_OPT "-verbose ${LUS_VERBOSE}")
94
  else()
95
    # the default is to be quiet.
96
    set(LUSTRE_VERBOSE_OPT "-verbose;0")
97
  endif()
98

  
84 99
  file(MAKE_DIRECTORY ${LUSTRE_OUTPUT_DIR})
85 100
  set(GLOBAL_LUSTRE_GENERATED_C_FILES "")
86 101
  # create list of generated C files in parent scope
......
97 112
    set(LUSTRE_GENERATED_FILES ${LUSTRE_GENERATED_FILES} ${LUSTRE_OUTPUT_DIR}/${L}.lusic)
98 113
    add_custom_command(
99 114
      OUTPUT ${LUSTRE_GENERATED_FILES}
100
      COMMAND ${LUSTRE_COMPILER} ${LUSTRE_NODE_OPT} -d ${LUSTRE_OUTPUT_DIR} ${LFILE}
115
      COMMAND ${LUSTRE_COMPILER} ${LUSTRE_VERBOSE_OPT} ${LUSTRE_NODE_OPT} -d ${LUSTRE_OUTPUT_DIR} ${LFILE}
101 116
      DEPENDS ${LFILE}
102 117
      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
103 118
      COMMENT "Compile Lustre source(s): ${LFILE} (generates: ${LUSTRE_GENERATED_FILES})."
......
109 124
  add_library(${LUS_LIBNAME} SHARED
110 125
              ${GLOBAL_LUSTRE_GENERATED_C_FILES} ${LUS_USER_C_FILES}
111 126
              )
127
  set_target_properties(${LUS_LIBNAME} PROPERTIES COMPILE_FLAGS "-std=c99")
112 128
  set(LUSTRE_GENERATED_C_FILES_${LUS_LIBNAME} "${GLOBAL_LUSTRE_GENERATED_C_FILES}" PARENT_SCOPE)
113 129
  message(STATUS "Lustre: Added rule for building lustre library: ${LUS_LIBNAME}")
114 130
endfunction(Lustre_Compile)
src/Makefile
1
OCAMLBUILD=/opt/local/bin/ocamlbuild -classic-display -no-links 
1
OCAMLBUILD=/Users/teme/.opam/4.02.1/bin/ocamlbuild -classic-display -no-links 
2 2

  
3 3
prefix=/usr/local
4 4
exec_prefix=${prefix}
src/automata.ml
68 68
  mkexpr loc (Expr_when (List.fold_right add_branch conds (mkidentpair loc restart state), state, tag))
69 69

  
70 70
let rec unless_read reads handler =
71
  let res =
71 72
  List.fold_left (fun read (_, c, _, _) -> get_expr_vars read c) reads handler.hand_unless
73
  in
74
(
75
(*
76
Format.eprintf "unless_reads %s = %a@." handler.hand_state (fprintf_list ~sep:" , " (fun fmt v -> Format.fprintf fmt "%s" v)) (ISet.elements reads);
77
Format.eprintf "unless_reads' %s = %a@." handler.hand_state (fprintf_list ~sep:" , " (fun fmt v -> Format.fprintf fmt "%s" v)) (ISet.elements res);
78
*)
79
res
80
)
72 81

  
73 82
let rec until_read reads handler =
74 83
  List.fold_left (fun read (_, c, _, _) -> get_expr_vars read c) reads handler.hand_until
......
79 88
    List.fold_left (fun read stmt ->
80 89
      match stmt with
81 90
      | Eq eq -> get_expr_vars read eq.eq_rhs
82
      | Aut aut -> List.fold_left handler_read read aut.aut_handlers ) reads handler.hand_stmts
83
  in ISet.diff allvars locals
91
      | Aut aut -> automata_read read aut) reads handler.hand_stmts
92
  in let res = ISet.diff allvars locals
93
     in
94
(
95
(*
96
Format.eprintf "handler_allvars %s = %a@." handler.hand_state (fprintf_list ~sep:" , " (fun fmt v -> Format.fprintf fmt "%s" v)) (ISet.elements allvars);
97
Format.eprintf "handler_read %s = %a@." handler.hand_state (fprintf_list ~sep:" , " (fun fmt v -> Format.fprintf fmt "%s" v)) (ISet.elements res);
98
*)
99
res
100
)
101

  
102
and automata_read reads aut =
103
  List.fold_left (fun read handler -> until_read (handler_read (unless_read read handler) handler) handler) reads aut.aut_handlers
84 104

  
85 105
let rec handler_write writes handler =
86 106
  let locals = List.fold_left (fun locals v -> ISet.add v.var_id locals) ISet.empty handler.hand_locals in
......
117 137
  [aut_state.incoming_r'; aut_state.incoming_r; aut_state.actual_r; aut_state.incoming_s'; as_clock aut_state.incoming_s; as_clock aut_state.actual_s]
118 138

  
119 139
let node_of_unless nused used node aut_id aut_state handler =
140
(*Format.eprintf "node_of_unless %s@." node.node_id;*)
120 141
  let inputs = unless_read ISet.empty handler in
121 142
  let var_inputs = aut_state.incoming_r :: aut_state.incoming_s :: (node_vars_of_idents node inputs) in
122 143
  let var_outputs = aut_state.actual_r :: aut_state.actual_s :: [] in
......
160 181
  (fun name -> try IMap.find name table with Not_found -> name)
161 182

  
162 183
let node_of_assign_until nused used node aut_id aut_state handler =
184
(*Format.eprintf "node_of_assign_until %s@." node.node_id;*)
163 185
  let writes = handler_write ISet.empty handler in
164 186
  let inputs = ISet.diff (handler_read (until_read ISet.empty handler) handler) writes in
165 187
  let frename = mk_frename used writes in
166 188
  let var_inputs = node_vars_of_idents node inputs in
167 189
  let new_var_locals = node_vars_of_idents node writes in
168
  let var_outputs = node_vars_of_idents node writes in
190
  let var_outputs = List.sort IdentModule.compare (node_vars_of_idents node writes) in
169 191
  let new_var_outputs = List.map (fun vdecl -> { vdecl with var_id = frename vdecl.var_id }) var_outputs in
170 192
  let new_output_eqs = List.map2 (fun o o' -> Eq (mkeq handler.hand_loc ([o'.var_id], mkident handler.hand_loc o.var_id))) var_outputs new_var_outputs in
171 193
  let until_expr = List.fold_right add_branch handler.hand_until (mkidentpair handler.hand_loc aut_state.actual_r.var_id aut_state.actual_s.var_id) in
src/backends/C/c_backend_common.ml
92 92
let pp_machine_reset_name fmt id = fprintf fmt "%s_reset" id
93 93
let pp_machine_step_name fmt id = fprintf fmt "%s_step" id
94 94

  
95
let pp_c_dimension fmt d =
96
 fprintf fmt "%a" Dimension.pp_dimension d
95
let rec pp_c_dimension fmt dim =
96
  match dim.Dimension.dim_desc with
97
  | Dimension.Dident id       ->
98
    fprintf fmt "%s" id
99
  | Dimension.Dint i          ->
100
    fprintf fmt "%d" i
101
  | Dimension.Dbool b         ->
102
    fprintf fmt "%B" b
103
  | Dimension.Dite (i, t, e)  ->
104
    fprintf fmt "((%a)?%a:%a)"
105
       pp_c_dimension i pp_c_dimension t pp_c_dimension e
106
 | Dimension.Dappl (f, args) ->
107
     fprintf fmt "%a" (Basic_library.pp_c f pp_c_dimension) args
108
 | Dimension.Dlink dim' -> fprintf fmt "%a" pp_c_dimension dim'
109
 | Dimension.Dvar       -> fprintf fmt "_%s" (Utils.name_of_dimension dim.Dimension.dim_id)
110
 | Dimension.Dunivar    -> fprintf fmt "'%s" (Utils.name_of_dimension dim.Dimension.dim_id)
97 111

  
98 112
let is_basic_c_type t =
99 113
  match (Types.repr t).Types.tdesc with
......
119 133
    | Types.Tstatic (_, t') -> fprintf fmt "const "; aux t' pp_suffix
120 134
    | Types.Tconst ty       -> fprintf fmt "%s %s" ty var
121 135
    | Types.Tarrow (_, _)   -> fprintf fmt "void (*%s)()" var
122
    | _                     -> eprintf "internal error: pp_c_type %a@." Types.print_ty t; assert false
136
    | _                     -> eprintf "internal error: C_backend_common.pp_c_type %a@." Types.print_ty t; assert false
123 137
  in aux t (fun fmt () -> ())
124 138

  
125 139
let rec pp_c_initialize fmt t = 
......
138 152
let pp_c_tag fmt t =
139 153
 pp_print_string fmt (if t = tag_true then "1" else if t = tag_false then "0" else t)
140 154

  
155

  
141 156
(* Prints a constant value *)
142 157
let rec pp_c_const fmt c =
143 158
  match c with
......
154 169
   but an offset suffix may be added for array variables
155 170
*)
156 171
let rec pp_c_val self pp_var fmt v =
172
  (*Format.eprintf "C_backend_common.pp_c_val %a@." pp_val v;*)
157 173
  match v with
158 174
  | Cst c         -> pp_c_const fmt c
159 175
  | Array vl      -> fprintf fmt "{%a}" (Utils.fprintf_list ~sep:", " (pp_c_val self pp_var)) vl
160 176
  | Access (t, i) -> fprintf fmt "%a[%a]" (pp_c_val self pp_var) t (pp_c_val self pp_var) i
161
  | Power (v, n)  -> assert false
177
  | Power (v, n)  -> (Format.eprintf "internal error: C_backend_common.pp_c_val %a@." pp_val v; assert false)
162 178
  | LocalVar v    -> pp_var fmt v
163 179
  | StateVar v    ->
164 180
    (* array memory vars are represented by an indirection to a local var with the right type,
src/backends/C/c_backend_src.ml
30 30
(*                    Instruction Printing functions                                        *)
31 31
(********************************************************************************************)
32 32

  
33

  
33 34
(* Computes the depth to which multi-dimension array assignments should be expanded.
34 35
   It equals the maximum number of nested static array constructions accessible from root [v].
35 36
*)
......
101 102
    List.partition (function (d, LInt _) -> true | _ -> false) loop_vars 
102 103
  in
103 104
  var_loops @ int_loops
104
    
105

  
105 106
(* Prints a one loop variable suffix for arrays *)
106 107
let pp_loop_var fmt lv =
107 108
 match snd lv with
108 109
 | LVar v -> fprintf fmt "[%s]" v
109 110
 | LInt r -> fprintf fmt "[%d]" !r
110
 | LAcc i -> fprintf fmt "[%a]" pp_val i
111
 | LAcc i -> fprintf fmt "[%a]" pp_c_dimension (dimension_of_value i)
111 112

  
112 113
(* Prints a suffix of loop variables for arrays *)
113 114
let pp_suffix fmt loop_vars =
114 115
 Utils.fprintf_list ~sep:"" pp_loop_var fmt loop_vars
115 116

  
116
(* Prints a [value] indexed by the suffix list [loop_vars] *)
117
let rec pp_value_suffix self loop_vars pp_value fmt value =
117
(* Prints a value expression [v], with internal function calls only.
118
   [pp_var] is a printer for variables (typically [pp_c_var_read]),
119
   but an offset suffix may be added for array variables
120
*)
121
(* Prints a constant value before a suffix (needs casting) *)
122
let rec pp_c_const_suffix var_type fmt c =
123
  match c with
124
    | Const_int i     -> pp_print_int fmt i
125
    | Const_real r    -> pp_print_string fmt r
126
    | Const_float r   -> pp_print_float fmt r
127
    | Const_tag t     -> pp_c_tag fmt t
128
    | Const_array ca  -> let var_type = Types.array_element_type var_type in
129
                         fprintf fmt "(%a[]){%a }" (pp_c_type "") var_type (Utils.fprintf_list ~sep:", " (pp_c_const_suffix var_type)) ca
130
    | Const_struct fl -> fprintf fmt "{%a }" (Utils.fprintf_list ~sep:", " (fun fmt (f, c) -> (pp_c_const_suffix (Types.struct_field_type var_type f)) fmt c)) fl
131
    | Const_string _ -> assert false (* string occurs in annotations not in C *)
132

  
133

  
134
(* Prints a [value] of type [var_type] indexed by the suffix list [loop_vars] *)
135
let rec pp_value_suffix self var_type loop_vars pp_value fmt value =
136
(*Format.eprintf "pp_value_suffix: %a %a %a@." Types.print_ty var_type Machine_code.pp_val value pp_suffix loop_vars;*)
118 137
 match loop_vars, value with
138
 | (x, LAcc i) :: q, _ when is_const_index i ->
139
   let r = ref (Dimension.size_const_dimension (Machine_code.dimension_of_value i)) in
140
   pp_value_suffix self var_type ((x, LInt r)::q) pp_value fmt value
141
 | (_, LInt r) :: q, Cst (Const_array cl) ->
142
   let var_type = Types.array_element_type var_type in
143
   pp_value_suffix self var_type q pp_value fmt (Cst (List.nth cl !r))
119 144
 | (_, LInt r) :: q, Array vl      ->
120
   pp_value_suffix self q pp_value fmt (List.nth vl !r)
145
   let var_type = Types.array_element_type var_type in
146
   pp_value_suffix self var_type q pp_value fmt (List.nth vl !r)
147
 | loop_var    :: q, Array vl      ->
148
   let var_type = Types.array_element_type var_type in
149
   Format.fprintf fmt "(%a[]){%a }%a" (pp_c_type "") var_type (Utils.fprintf_list ~sep:", " (pp_value_suffix self var_type q pp_value)) vl pp_suffix [loop_var]
150
 | []              , Array vl      ->
151
   let var_type = Types.array_element_type var_type in
152
   Format.fprintf fmt "(%a[]){%a }" (pp_c_type "") var_type (Utils.fprintf_list ~sep:", " (pp_value_suffix self var_type [] pp_value)) vl
121 153
 | _           :: q, Power (v, n)  ->
122
   pp_value_suffix self q pp_value fmt v
154
   pp_value_suffix self var_type q pp_value fmt v
123 155
 | _               , Fun (n, vl)   ->
124
   Basic_library.pp_c n (pp_value_suffix self loop_vars pp_value) fmt vl
156
   Basic_library.pp_c n (pp_value_suffix self var_type loop_vars pp_value) fmt vl
125 157
 | _               , Access (v, i) ->
126
   pp_value_suffix self ((Dimension.mkdim_var (), LAcc i) :: loop_vars) pp_value fmt v
127
 | _               , _             ->
128
   let pp_var_suffix fmt v = fprintf fmt "%a%a" pp_value v pp_suffix loop_vars in
129
   pp_c_val self pp_var_suffix fmt value
158
   let var_type = Type_predef.type_array (Dimension.mkdim_var ()) var_type in
159
   pp_value_suffix self var_type ((Dimension.mkdim_var (), LAcc i) :: loop_vars) pp_value fmt v
160
 | _               , LocalVar v    -> Format.fprintf fmt "%a%a" pp_value v pp_suffix loop_vars
161
 | _               , StateVar v    ->
162
    (* array memory vars are represented by an indirection to a local var with the right type,
163
       in order to avoid casting everywhere. *)
164
   if Types.is_array_type v.var_type
165
   then Format.fprintf fmt "%a%a" pp_value v pp_suffix loop_vars
166
   else Format.fprintf fmt "%s->_reg.%a%a" self pp_value v pp_suffix loop_vars
167
 | _               , Cst cst       -> pp_c_const_suffix var_type fmt cst
168
 | _               , _             -> (Format.eprintf "internal error: C_backend_src.pp_value_suffix %a %a %a@." Types.print_ty var_type Machine_code.pp_val value pp_suffix loop_vars; assert false)
169

  
170
(* Subsumes C_backend_common.pp_c_val to cope with aggressive substitution
171
   which may yield constant arrays in expressions.
172
   Type is needed to correctly print constant arrays.
173
 *)
174
let pp_c_val self pp_var fmt (t, v) =
175
  pp_value_suffix self t [] pp_var fmt v
130 176

  
131 177
(* type_directed assignment: array vs. statically sized type
132 178
   - [var_type]: type of variable to be assigned
......
157 203
    match vars with
158 204
    | [] ->
159 205
      fprintf fmt "%a = %a;" 
160
	(pp_value_suffix self loop_vars pp_var) var_name
161
	(pp_value_suffix self loop_vars pp_var) value
206
	(pp_value_suffix self var_type loop_vars pp_var) var_name
207
	(pp_value_suffix self var_type loop_vars pp_var) value
162 208
    | (d, LVar i) :: q ->
163 209
(*eprintf "pp_aux %a %s@." Dimension.pp_dimension d i;*)
164 210
      fprintf fmt "@[<v 2>{@,int %s;@,for(%s=0;%s<%a;%s++)@,%a @]@,}"
......
177 223
    aux fmt reordered_loop_vars
178 224
  end
179 225

  
180
let pp_instance_call m self fmt i (inputs: value_t list) (outputs: var_decl list) =
181
 try (* stateful node instance *)
182
   let (n,_) = List.assoc i m.minstances in
183
   fprintf fmt "%a (%a%t%a%t%s->%s);"
184
     pp_machine_step_name (node_name n)
185
     (Utils.fprintf_list ~sep:", " (pp_c_val self (pp_c_var_read m))) inputs
186
     (Utils.pp_final_char_if_non_empty ", " inputs) 
187
     (Utils.fprintf_list ~sep:", " (pp_c_var_write m)) outputs
188
     (Utils.pp_final_char_if_non_empty ", " outputs)
189
     self
190
     i
191
 with Not_found -> (* stateless node instance *)
192
   let (n,_) = List.assoc i m.mcalls in
193
   fprintf fmt "%a (%a%t%a);"
194
     pp_machine_step_name (node_name n)
195
     (Utils.fprintf_list ~sep:", " (pp_c_val self (pp_c_var_read m))) inputs
196
     (Utils.pp_final_char_if_non_empty ", " inputs) 
197
     (Utils.fprintf_list ~sep:", " (pp_c_var_write m)) outputs 
198

  
199
let pp_machine_reset (m: machine_t) self fmt inst =
200
  let (node, static) =
201
    try
202
      List.assoc inst m.minstances
203
    with Not_found -> (Format.eprintf "pp_machine_reset %s %s %s: internal error@," m.mname.node_id self inst; raise Not_found) in
204
  fprintf fmt "%a(%a%t%s->%s);"
205
    pp_machine_reset_name (node_name node)
206
    (Utils.fprintf_list ~sep:", " Dimension.pp_dimension) static
207
    (Utils.pp_final_char_if_non_empty ", " static)
208
    self inst
209

  
210 226
let has_c_prototype funname dependencies =
211 227
  let imported_node_opt = (* We select the last imported node with the name funname.
212 228
			       The order of evaluation of dependencies should be
......
232 248
    | None -> false
233 249
    | Some nd -> (match nd.nodei_prototype with Some "C" -> true | _ -> false)
234 250

  
251
let pp_instance_call dependencies m self fmt i (inputs: value_t list) (outputs: var_decl list) =
252
  try (* stateful node instance *)
253
    let (n,_) = List.assoc i m.minstances in
254
    let (input_types, _) = Typing.get_type_of_call n in
255
    let inputs = List.combine input_types inputs in
256
    fprintf fmt "%a (%a%t%a%t%s->%s);"
257
      pp_machine_step_name (node_name n)
258
      (Utils.fprintf_list ~sep:", " (pp_c_val self (pp_c_var_read m))) inputs
259
      (Utils.pp_final_char_if_non_empty ", " inputs) 
260
      (Utils.fprintf_list ~sep:", " (pp_c_var_write m)) outputs
261
      (Utils.pp_final_char_if_non_empty ", " outputs)
262
      self
263
      i
264
  with Not_found -> (* stateless node instance *)
265
    let (n,_) = List.assoc i m.mcalls in
266
    let (input_types, output_types) = Typing.get_type_of_call n in
267
    let inputs = List.combine input_types inputs in
268
    if has_c_prototype i dependencies
269
    then (* external C function *)
270
      let outputs = List.map2 (fun t v -> t, LocalVar v) output_types outputs in
271
      fprintf fmt "%a = %s(%a);"
272
	(Utils.fprintf_list ~sep:", " (pp_c_val self (pp_c_var_read m))) outputs
273
	i
274
	(Utils.fprintf_list ~sep:", " (pp_c_val self (pp_c_var_read m))) inputs
275
    else
276
      fprintf fmt "%a (%a%t%a);"
277
	pp_machine_step_name (node_name n)
278
	(Utils.fprintf_list ~sep:", " (pp_c_val self (pp_c_var_read m))) inputs
279
	(Utils.pp_final_char_if_non_empty ", " inputs) 
280
	(Utils.fprintf_list ~sep:", " (pp_c_var_write m)) outputs 
281

  
282
let pp_machine_reset (m: machine_t) self fmt inst =
283
  let (node, static) =
284
    try
285
      List.assoc inst m.minstances
286
    with Not_found -> (Format.eprintf "pp_machine_reset %s %s %s: internal error@," m.mname.node_id self inst; raise Not_found) in
287
  fprintf fmt "%a(%a%t%s->%s);"
288
    pp_machine_reset_name (node_name node)
289
    (Utils.fprintf_list ~sep:", " Dimension.pp_dimension) static
290
    (Utils.pp_final_char_if_non_empty ", " static)
291
    self inst
292

  
235 293
let rec pp_conditional dependencies (m: machine_t) self fmt c tl el =
236 294
  fprintf fmt "@[<v 2>if (%a) {%t%a@]@,@[<v 2>} else {%t%a@]@,}"
237
    (pp_c_val self (pp_c_var_read m)) c
295
    (pp_c_val self (pp_c_var_read m)) (Type_predef.type_bool, c)
238 296
    (Utils.pp_newline_if_non_empty tl)
239 297
    (Utils.fprintf_list ~sep:"@," (pp_machine_instr dependencies m self)) tl
240 298
    (Utils.pp_newline_if_non_empty el)
......
254 312
      i.var_type (StateVar i) v
255 313
  | MStep ([i0], i, vl) when Basic_library.is_internal_fun i  ->
256 314
    pp_machine_instr dependencies m self fmt (MLocalAssign (i0, Fun (i, vl)))
257
  | MStep ([i0], i, vl) when has_c_prototype i dependencies -> 
258
    fprintf fmt "%a = %s(%a);" 
259
      (pp_c_val self (pp_c_var_read m)) (LocalVar i0) 
260
      i
261
      (Utils.fprintf_list ~sep:", " (pp_c_val self (pp_c_var_read m))) vl
262 315
  | MStep (il, i, vl) ->
263
    pp_instance_call m self fmt i vl il
264
  | MBranch (g,hl) ->
265
    if hl <> [] && let t = fst (List.hd hl) in t = tag_true || t = tag_false
316
    pp_instance_call dependencies m self fmt i vl il
317
  | MBranch (_, []) -> (Format.eprintf "internal error: C_backend_src.pp_machine_instr %a@." pp_instr instr; assert false)
318
  | MBranch (g, hl) ->
319
    if let t = fst (List.hd hl) in t = tag_true || t = tag_false
266 320
    then (* boolean case, needs special treatment in C because truth value is not unique *)
267 321
	 (* may disappear if we optimize code by replacing last branch test with default *)
268 322
      let tl = try List.assoc tag_true  hl with Not_found -> [] in
269 323
      let el = try List.assoc tag_false hl with Not_found -> [] in
270 324
      pp_conditional dependencies m self fmt g tl el
271 325
    else (* enum type case *)
326
      let g_typ = Typing.type_const Location.dummy_loc (Const_tag (fst (List.hd hl))) in
272 327
      fprintf fmt "@[<v 2>switch(%a) {@,%a@,}@]"
273
	(pp_c_val self (pp_c_var_read m)) g
328
	(pp_c_val self (pp_c_var_read m)) (g_typ, g)
274 329
	(Utils.fprintf_list ~sep:"@," (pp_machine_branch dependencies m self)) hl
275 330

  
276 331
and pp_machine_branch dependencies m self fmt (t, h) =
src/backends/Horn/horn_backend.ml
1
(********************************************************************)
1 2
(*                                                                  *)
2 3
(*  The LustreC compiler toolset   /  The LustreC Development Team  *)
3 4
(*  Copyright 2012 -    --   ONERA - CNRS - INPT                    *)
......
46 47
  match l with
47 48
    [] -> assert false
48 49
  | [x] -> pp fmt x
49
  | _ -> fprintf fmt "(and @[<v 0>%a@]@ )" (Utils.fprintf_list ~sep:"\n\t" pp) l
50
  | _ -> fprintf fmt "(and @[<v 0>%a@]@ )" (Utils.fprintf_list ~sep:" " pp) l
50 51

  
51 52

  
52 53

  
src/basic_library.ml
127 127
    | "equi", [v1; v2] -> Format.fprintf fmt "(!%a == !%a)" pp_val v1 pp_val v2
128 128
    | "xor", [v1; v2] -> Format.fprintf fmt "(!%a != !%a)" pp_val v1 pp_val v2
129 129
    | _, [v1; v2] -> Format.fprintf fmt "(%a %s %a)" pp_val v1 i pp_val v2
130
    | _ -> failwith i
130
    | _ -> (Format.eprintf "internal error: Basic_library.pp_c %s@." i; assert false)
131 131

  
132 132
let pp_java i pp_val fmt vl =
133 133
  match i, vl with
......
140 140
    | "equi", [v1; v2] -> Format.fprintf fmt "(%a == %a)" pp_val v1 pp_val v2
141 141
    | "xor", [v1; v2] -> Format.fprintf fmt "(%a != %a)" pp_val v1 pp_val v2
142 142
    | _, [v1; v2] -> Format.fprintf fmt "(%a %s %a)" pp_val v1 i pp_val v2
143
    | _ -> assert false
143
    | _ -> (Format.eprintf "internal error: Basic_library.pp_java %s@." i; assert false)
144 144

  
145 145
let pp_horn i pp_val fmt vl =
146 146
  match i, vl with
......
158 158
  | "!=", [v1; v2] -> Format.fprintf fmt "(not (= %a %a))" pp_val v1 pp_val v2
159 159
  | "/", [v1; v2] -> Format.fprintf fmt "(div %a %a)" pp_val v1 pp_val v2
160 160
  | _, [v1; v2] -> Format.fprintf fmt "(%s %a %a)" i pp_val v1 pp_val v2
161
  | _ -> assert false
161
  | _ -> (Format.eprintf "internal error: Basic_library.pp_horn %s@." i; assert false)
162 162
(*  | "mod", [v1; v2] -> Format.fprintf fmt "(%a %% %a)" pp_val v1 pp_val v2
163 163

  
164 164
*)
src/causality.ml
216 216
    | Expr_fby (e1, e2)  -> add_dep true lhs e2 (add_dep false lhs e1 g)
217 217
    | Expr_pre e      -> add_dep true lhs e g
218 218
    | Expr_ident x -> add_var lhs_is_mem lhs x (add_clock lhs_is_mem lhs rhs.expr_clock g)
219
    | Expr_access (e1, _)
220
    | Expr_power (e1, _) -> add_dep lhs_is_mem lhs e1 g
219
    | Expr_access (e1, d)
220
    | Expr_power (e1, d) -> add_dep lhs_is_mem lhs e1 (add_dep lhs_is_mem lhs (expr_of_dimension d) g)
221 221
    | Expr_array a -> List.fold_right (add_dep lhs_is_mem lhs) a g
222 222
    | Expr_tuple t -> List.fold_right2 (fun l r -> add_dep lhs_is_mem [l] r) lhs t g
223 223
    | Expr_merge (c, hl) -> add_var lhs_is_mem lhs c (List.fold_right (fun (_, h) -> add_dep lhs_is_mem lhs h) hl g)
......
526 526
    IdentDepGraph.iter_edges (fun s t -> IdentDepGraph.add_edge g1 s t) g2
527 527
  end
528 528

  
529
let world = "!!_world"
530

  
529 531
let add_external_dependency outputs mems g =
530
  let caller ="!!_world" in
531 532
  begin
532
    IdentDepGraph.add_vertex g caller;
533
    ISet.iter (fun o -> IdentDepGraph.add_edge g caller o) outputs;
534
    ISet.iter (fun m -> IdentDepGraph.add_edge g caller m) mems;
533
    IdentDepGraph.add_vertex g world;
534
    ISet.iter (fun o -> IdentDepGraph.add_edge g world o) outputs;
535
    ISet.iter (fun m -> IdentDepGraph.add_edge g world m) mems;
535 536
  end
536 537

  
537 538
let global_dependency node =
src/liveness.ml
81 81
    Disjunction.CISet.empty
82 82
    node.node_locals
83 83

  
84
let kill_instance_variables ctx inst =
85
  IdentDepGraph.remove_vertex ctx.dep_graph inst
86

  
84 87
let kill_root ctx head =
85 88
  IdentDepGraph.iter_succ (IdentDepGraph.remove_edge ctx.dep_graph head.var_id) ctx.dep_graph head.var_id
86 89

  
......
89 92
   - [evaluated] is the set of already evaluated variables,
90 93
     wrt the scheduling
91 94
   - does only remove edges, not variables themselves
95
   - yet, instance variables are removed
92 96
*)
93 97
let remove_roots ctx =
94 98
  let rem = ref true in
......
97 101
  do
98 102
    rem := false;
99 103
    let all_roots = graph_roots ctx.dep_graph in
100
    let frontier_roots = Disjunction.CISet.filter (fun v -> List.mem v.var_id all_roots) !remaining in
101
    if not (Disjunction.CISet.is_empty frontier_roots) then
104
    let inst_roots, var_roots = List.partition (fun v -> ExprDep.is_instance_var v && v <> Causality.world) all_roots in
105
    let frontier_roots = Disjunction.CISet.filter (fun v -> List.mem v.var_id var_roots) !remaining in
106
    if not (Disjunction.CISet.is_empty frontier_roots && inst_roots = []) then
102 107
      begin
103 108
	rem := true;
109
	List.iter (kill_instance_variables ctx) inst_roots;
104 110
	Disjunction.CISet.iter (kill_root ctx) frontier_roots;
105 111
	remaining := Disjunction.CISet.diff !remaining frontier_roots
106 112
      end
src/lustreSpec.ml
132 132
  behaviors: (string * eexpr list * eexpr list * Location.t) list;
133 133
  spec_loc: Location.t;
134 134
}
135

  
136
type offset =
137
| Index of Dimension.dim_expr
138
| Field of label
139

  
135 140
type assert_t = 
136 141
    {
137 142
      assert_expr: expr;
src/machine_code.ml
496 496
  assert (ISet.is_empty m0);
497 497
  assert (init0 = []);
498 498
  assert (Utils.IMap.is_empty j0);
499
  let m, init, j, locals, s = translate_eqs nd (m0, init0, j0, locals0, s0) sorted_eqs in
499
  let m, init, j, locals, s = translate_eqs nd (m0, init0, j0, locals0, []) sorted_eqs in
500 500
  let mmap = Utils.IMap.fold (fun i n res -> (i, n)::res) j [] in
501 501
  {
502 502
    mname = nd;
src/main_lustre_compiler.ml
98 98
  (* Removing automata *)
99 99
  let prog = Automata.expand_decls prog in
100 100

  
101
  Log.report ~level:4 (fun fmt -> fprintf fmt "After automata expansion:@.@[<v 2>@ %a@]@," Printers.pp_prog prog);
102

  
101 103
  (* Importing source *)
102 104
  let _ = Modules.load_program ISet.empty prog in
103 105

  
......
230 232
  Log.report ~level:1 (fun fmt -> fprintf fmt ".. machines generation@,");
231 233
  let machine_code = Machine_code.translate_prog prog node_schs in
232 234

  
235
  Log.report ~level:2 (fun fmt -> fprintf fmt "@[<v 2>@ %a@]@,"
236
  (Utils.fprintf_list ~sep:"@ " Machine_code.pp_machine)
237
  machine_code);
238

  
233 239
  (* Optimize machine code *)
234 240
  let machine_code =
235 241
    if !Options.optimization >= 4 && !Options.output <> "horn" then
......
241 247
      machine_code
242 248
  in
243 249

  
244
  Log.report ~level:2 (fun fmt -> fprintf fmt "@[<v 2>@ %a@]@,"
245
  (Utils.fprintf_list ~sep:"@ " Machine_code.pp_machine)
246
  machine_code);
247

  
248 250
  (* Optimize machine code *)
249 251
  let machine_code =
250 252
    if !Options.optimization >= 2 && !Options.output <> "horn" then
......
266 268
      machine_code
267 269
  in
268 270

  
269

  
270
  Log.report ~level:3 (fun fmt -> fprintf fmt "@[<v 2>@ %a@]@,"
271
  (Utils.fprintf_list ~sep:"@ " Machine_code.pp_machine)
272
  machine_code);
271
  if !Options.optimization >= 2 then
272
    begin
273
      Log.report ~level:3 (fun fmt -> fprintf fmt "@[<v 2>@ %a@]@,"
274
	(Utils.fprintf_list ~sep:"@ " Machine_code.pp_machine)
275
	machine_code);
276
    end;
273 277

  
274 278
  (* Printing code *)
275 279
  let basename    =  Filename.basename basename in
src/myocamlbuild.ml
5 5
dispatch begin function
6 6
| After_rules ->
7 7
    (* We declare external libraries *)
8
    ocaml_lib ~extern:true ~dir:"/Users/Teme/.opam/system/lib/ocamlgraph" "graph";
8
    ocaml_lib ~extern:true ~dir:"/Users/teme/.opam/4.02.1/lib/ocamlgraph" "graph";
9 9
  if @CC_NOASNEEDED@ then
10 10
    flag ["ocaml"; "link"]
11 11
      (S [A"-cclib";A"-Wl,--no-as-needed"]);
src/optimize_machine.ml
16 16
open Machine_code 
17 17
open Dimension
18 18

  
19

  
19 20
let pp_elim fmt elim =
20 21
  begin
21 22
    Format.fprintf fmt "{ /* elim table: */@.";
......
52 53
let eliminate_dim elim dim =
53 54
  Dimension.expr_replace_expr (fun v -> try dimension_of_value (IMap.find v elim) with Not_found -> mkdim_ident dim.dim_loc v) dim
54 55

  
56
let unfold_expr_offset m offset expr =
57
  List.fold_left (fun res -> (function Index i -> Access(res, value_of_dimension m i) | Field f -> failwith "not yet implemented")) expr offset
58

  
59
let rec simplify_cst_expr m offset cst =
60
    match offset, cst with
61
    | []          , _
62
        -> Cst cst
63
    | Index i :: q, Const_array cl when Dimension.is_dimension_const i
64
	-> simplify_cst_expr m q (List.nth cl (Dimension.size_const_dimension i))
65
    | Index i :: q, Const_array cl
66
        -> unfold_expr_offset m [Index i] (Array (List.map (simplify_cst_expr m q) cl))
67
    | Field f :: q, Const_struct fl
68
        -> simplify_cst_expr m q (List.assoc f fl)
69
    | _ -> (Format.eprintf "internal error: Optimize_machine.simplify_cst_expr %a@." Printers.pp_const cst; assert false)
70

  
71
let simplify_expr_offset m expr =
72
  let rec simplify offset expr =
73
    match offset, expr with
74
    | Field f ::q , _                -> failwith "not yet implemented"
75
    | _           , Fun (id, vl) when Basic_library.is_internal_fun id
76
                                     -> Fun (id, List.map (simplify offset) vl)
77
    | _           , Fun _
78
    | _           , StateVar _
79
    | _           , LocalVar _       -> unfold_expr_offset m offset expr
80
    | _           , Cst cst          -> simplify_cst_expr m offset cst
81
    | _           , Access (expr, i) -> simplify (Index (dimension_of_value i) :: offset) expr
82
    | []          , _                -> expr
83
    | Index _ :: q, Power (expr, _)  -> simplify q expr
84
    | Index i :: q, Array vl when Dimension.is_dimension_const i
85
                                     -> simplify q (List.nth vl (Dimension.size_const_dimension i))
86
    | Index i :: q, Array vl         -> unfold_expr_offset m [Index i] (Array (List.map (simplify q) vl))
87
    | _ -> (Format.eprintf "internal error: Optimize_machine.simplify_expr_offset %a@." pp_val expr; assert false)
88
    (*Format.eprintf "simplify_expr %a %a = %a@." pp_val expr (Utils.fprintf_list ~sep:"" Printers.pp_offset) offset pp_val res; res)
89
     with e -> (Format.eprintf "simplify_expr %a %a = <FAIL>@." pp_val expr (Utils.fprintf_list ~sep:"" Printers.pp_offset) offset; raise e*)
90
  in simplify [] expr
91

  
92
let rec simplify_instr_offset m instr =
93
  match instr with
94
  | MLocalAssign (v, expr) -> MLocalAssign (v, simplify_expr_offset m expr)
95
  | MStateAssign (v, expr) -> MStateAssign (v, simplify_expr_offset m expr)
96
  | MReset id              -> instr
97
  | MStep (outputs, id, inputs) -> MStep (outputs, id, List.map (simplify_expr_offset m) inputs)
98
  | MBranch (cond, brl)
99
    -> MBranch(simplify_expr_offset m cond, List.map (fun (l, il) -> l, simplify_instrs_offset m il) brl)
100

  
101
and simplify_instrs_offset m instrs =
102
  List.map (simplify_instr_offset m) instrs
103

  
55 104
let is_scalar_const c =
56 105
  match c with
57 106
  | Const_int _
......
60 109
  | Const_tag _   -> true
61 110
  | _             -> false
62 111

  
63
let basic_unfoldable_expr expr =
64
  match expr with
65
  | Cst c when is_scalar_const c -> true
66
  | LocalVar _
67
  | StateVar _                   -> true
68
  | _                            -> false
112
(* An instruction v = expr may (and will) be unfolded iff:
113
   - either expr is atomic
114
     (no complex expressions, only const, vars and array/struct accesses)
115
   - or v has a fanin <= 1 (used at most once)
116
*)
117
let is_unfoldable_expr fanin expr =
118
  let rec unfold_const offset cst =
119
    match offset, cst with
120
    | _           , Const_int _
121
    | _           , Const_real _
122
    | _           , Const_float _
123
    | _           , Const_tag _     -> true
124
    | Field f :: q, Const_struct fl -> unfold_const q (List.assoc f fl)
125
    | []          , Const_struct _  -> false
126
    | Index i :: q, Const_array cl when Dimension.is_dimension_const i
127
                                    -> unfold_const q (List.nth cl (Dimension.size_const_dimension i))
128
    | _           , Const_array _   -> false
129
    | _                             -> assert false in
130
  let rec unfold offset expr =
131
    match offset, expr with
132
    | _           , Cst cst                      -> unfold_const offset cst
133
    | _           , LocalVar _
134
    | _           , StateVar _                   -> true
135
    | []          , Power _
136
    | []          , Array _                      -> false
137
    | Index i :: q, Power (v, _)                 -> unfold q v
138
    | Index i :: q, Array vl when Dimension.is_dimension_const i
139
                                                 -> unfold q (List.nth vl (Dimension.size_const_dimension i))
140
    | _           , Array _                      -> false
141
    | _           , Access (v, i)                -> unfold (Index (dimension_of_value i) :: offset) v
142
    | _           , Fun (id, vl) when fanin < 2 && Basic_library.is_internal_fun id
143
                                                 -> List.for_all (unfold offset) vl
144
    | _           , Fun _                        -> false
145
    | _                                          -> assert false
146
  in unfold [] expr
69 147

  
70 148
let unfoldable_assign fanin v expr =
71 149
  try
72 150
    let d = Hashtbl.find fanin v.var_id
73
    in basic_unfoldable_expr expr ||
151
    in is_unfoldable_expr d expr
152
  with Not_found -> false
153
(*
154
let unfoldable_assign fanin v expr =
155
  try
156
    let d = Hashtbl.find fanin v.var_id
157
    in is_basic_expr expr ||
74 158
    match expr with
75 159
    | Cst c when d < 2                                           -> true
76 160
    | Fun (id, _) when d < 2 && Basic_library.is_internal_fun id -> true
77 161
    | _                                                          -> false
78 162
  with Not_found -> false
79

  
163
*)
80 164
let merge_elim elim1 elim2 =
81 165
  let merge k e1 e2 =
82 166
    match e1, e2 with
......
141 225
  (*Log.report ~level:1 (fun fmt -> Format.fprintf fmt "machine_unfold %a@." pp_elim elim);*)
142 226
  let elim_consts, mconst = instrs_unfold fanin elim machine.mconst in
143 227
  let elim_vars, instrs = instrs_unfold fanin elim_consts machine.mstep.step_instrs in
228
  let instrs = simplify_instrs_offset machine instrs in
229
  let checks = List.map (fun (loc, check) -> loc, eliminate_expr elim_vars check) machine.mstep.step_checks in
144 230
  let locals = List.filter (fun v -> not (IMap.mem v.var_id elim_vars)) machine.mstep.step_locals in
145 231
  let minstances = List.map (static_call_unfold elim_consts) machine.minstances in
146 232
  let mcalls = List.map (static_call_unfold elim_consts) machine.mcalls
......
150 236
      mstep = { 
151 237
	machine.mstep with 
152 238
	  step_locals = locals;
153
	  step_instrs = instrs
239
	  step_instrs = instrs;
240
	  step_checks = checks
154 241
      };
155 242
      mconst = mconst;
156 243
      minstances = minstances;
......
256 343
  (* Simple cases*)
257 344
  | MStep([v], id, vl) when Basic_library.is_internal_fun id
258 345
      -> instr_cse (subst, instrs) (MLocalAssign (v, Fun (id, vl)))
259
  | MLocalAssign(v, expr) when basic_unfoldable_expr expr
346
  | MLocalAssign(v, expr) when is_unfoldable_expr 2 expr
260 347
      -> (IMap.add v.var_id expr subst, instr :: instrs)
261 348
  | _ when is_assign instr
262 349
      -> subst_instr subst instrs instr
src/parser_lustre.mly
257 257
| STRUCT LCUR field_list RCUR { Tydec_struct (List.rev $3) }
258 258

  
259 259
array_typ_decl:
260
                            { fun typ -> typ }
260
 %prec POWER                { fun typ -> typ }
261 261
 | POWER dim array_typ_decl { fun typ -> $3 (Tydec_array ($2, typ)) }
262 262

  
263 263
typeconst:
src/printers.ml
332 332
  fprintf fmt "(* by Lustre-C compiler version %s, %a *)@." Version.number pp_date (Unix.gmtime (Unix.time ()));
333 333
  fprintf fmt "(* Feel free to mask some of the definitions by removing them from this file. *)@.@.";
334 334
  List.iter (fprintf fmt "%a@." pp_lusi) prog    
335
  
335

  
336
let pp_offset fmt offset =
337
  match offset with
338
  | Index i -> fprintf fmt "[%a]" Dimension.pp_dimension i
339
  | Field f -> fprintf fmt ".%s" f
340

  
336 341
(* Local Variables: *)
337 342
(* compile-command:"make -C .." *)
338 343
(* End: *)
src/types.ml
251 251
 | Tstatic (_, ty') -> is_struct_type ty'
252 252
 | _                -> false
253 253

  
254
let struct_field_type ty field =
255
  match (dynamic_type ty).tdesc with
256
  | Tstruct fields ->
257
    (try
258
       List.assoc field fields
259
     with Not_found -> assert false)
260
  | _              -> assert false
261

  
254 262
let rec is_array_type ty =
255 263
 match (repr ty).tdesc with
256 264
 | Tarray _         -> true
src/typing.ml
336 336
  (*Format.eprintf "subtyping const %B real %a:%a vs formal %a@." const Printers.pp_expr real_arg Types.print_ty real_type Types.print_ty formal_type;*)
337 337
  try_unify ~sub:sub formal_type real_type loc
338 338

  
339
and type_ident env in_main loc const id =
340
  type_expr env in_main const (expr_of_ident id loc)
341

  
342 339
(* typing an application implies:
343 340
   - checking that const formal parameters match real const (maybe symbolic) arguments
344 341
   - checking type adequation between formal and real arguments
......
452 449
    | Some c -> 
453 450
      check_constant expr.expr_loc const false;	
454 451
      type_subtyping_arg env in_main const c Type_predef.type_bool);
455
    let touts = type_appl env in_main expr.expr_loc const id (expr_list_of_expr args) in
452
    let args_list = expr_list_of_expr args in
453
    let touts = type_appl env in_main expr.expr_loc const id args_list in
454
    args.expr_type <- new_ty (Ttuple (List.map (fun a -> a.expr_type) args_list));
456 455
    expr.expr_type <- touts;
457 456
    touts
458 457
  | Expr_fby (e1,e2)
......
697 696
  | TypeDef _ -> List.fold_left type_top_decl env (consts_of_enum_type decl)
698 697
  | Open _  -> env
699 698

  
699
let get_type_of_call decl =
700
  match decl.top_decl_desc with
701
  | Node nd         ->
702
    let (in_typ, out_typ) = split_arrow nd.node_type in
703
    type_list_of_type in_typ, type_list_of_type out_typ
704
  | ImportedNode nd ->
705
    let (in_typ, out_typ) = split_arrow nd.nodei_type in
706
    type_list_of_type in_typ, type_list_of_type out_typ
707
  | _               -> assert false
708

  
700 709
let type_prog env decls =
701 710
try
702 711
  List.fold_left type_top_decl env decls
src/version.ml
1 1

  
2
let number = "1.0-Unversioned directory"
2
let number = "1.1-Unversioned directory"
3 3

  
4 4
let prefix = "/usr/local"
5 5

  
test/Makefile
4 4
	@bash ./test-compile.sh -a -v 2 tests_ok.list
5 5
	@rm build/*.o
6 6

  
7
horn:
8
	@bash ./regression.sh -r -v 2 horn_regression.list
9

  
10 7
clean:
11 8
	@rm -rf build
12 9
	@for i in `find . -iname *.lusi`; do grep generated $$i > /dev/null; if [ $$? -eq 0 ]; then rm $$i; fi; done
13 10

  
14 11
distclean: clean
15
	@rm -rf horn-report*
12
	@rm -rf report*
13

  
test/test-compile.sh
14 14
mkdir -p build
15 15
build=`pwd`"/build"
16 16

  
17
gcc_compile() {
18
    gcc -c -Wall -Wno-unused-but-set-variable -I ../../include/ "$1".c > /dev/null;
19
    if [ $? -ne 0 ]; then
20
	rgcc="INVALID";
21
    else
22
	rgcc="VALID"
23
    fi
24
}
25

  
26
lustrec_compile() {
27
    $LUSTREC "$@";
28
    if [ $? -ne 0 ]; then
29
        rlustrec="INVALID";
30
    else
31
        rlustrec="VALID"
32
    fi
33
}
17 34

  
18 35
base_compile() {
19 36
    while IFS=, read -r file main opts
......
26 43
	fi
27 44
        dir=${SRC_PREFIX}/`dirname "$file"`
28 45
	pushd $dir > /dev/null
29
    if [ "$main" != "" ]; then
30
	$LUSTREC -d $build -verbose 0 $opts -node $main "$name""$ext";
31
        if [ $? -ne 0 ]; then
32
            rlustrec1="INVALID";
33
        else
34
            rlustrec1="VALID"
35
	fi
36
	pushd $build > /dev/null
37
	if [ $ext = ".lus" ]; then
38
            gcc -c -Wall -Wno-unused-but-set-variable -I ../../include/ "$name".c > /dev/null
39
            if [ $? -ne 0 ]; then
40
		rgcc1="INVALID";
41
            else
42
		rgcc1="VALID"
43
	    fi
46

  
47
	if [ "$main" != "" ]; then
48
	    lustrec_compile -d $build -verbose 0 $opts -node $main $name$ext;
44 49
	else
45
	    rgcc1="NONE"
50
	    lustrec_compile -d $build -verbose 0 $opts $name$ext
46 51
	fi
47
	popd > /dev/null
48
    else
49
	$LUSTREC -d $build -verbose 0 $opts "$name""$ext";
50
        if [ $? -ne 0 ]; then
51
            rlustrec1="INVALID";
52
        else
53
            rlustrec1="VALID"
54
        fi
55 52
	pushd $build > /dev/null
56
	if [ $ext = ".lus" ]; then
57
            gcc -c -Wall -Wno-unused-but-set-variable -I ../../include/ "$name".c > /dev/null
58
            if [ $? -ne 0 ]; then
59
		rgcc1="INVALID";
60
            else
61
		rgcc1="VALID"
62
            fi
53

  
54
	if [ $ext = ".lus" ] && [ "$opts" != "-lusi" ]; then
55
            gcc_compile "$name";
63 56
	else
64
	    rgcc1="NONE"
57
	    rgcc="NONE"
65 58
	fi
66 59
	popd > /dev/null
67
    fi
68
    popd > /dev/null
69
    if [ $verbose -gt 0 ]; then
70
	echo "lustrec ($rlustrec1), gcc($rgcc1), $dir, ${name}${ext}, node $main" | column -t -s',' | tee -a $report;
71
    else
72
	echo "lustrec ($rlustrec1), gcc($rgcc1), $dir, ${name}${ext}, node $main" | column -t -s',' | tee -a $report | grep "INVALID\|ERROR\|UNKNOWN"
73
    fi;
60
	popd > /dev/null
61

  
62
	if [ $verbose -gt 0 ]; then
63
	    echo "lustrec ($rlustrec), gcc($rgcc), $dir, ${name}${ext}, node $main" | column -t -s',' | tee -a $report;
64
	else
65
	    echo "lustrec ($rlustrec), gcc($rgcc), $dir, ${name}${ext}, node $main" | column -t -s',' | tee -a $report | grep "INVALID\|ERROR\|UNKNOWN"
66
	fi;
74 67
    done < $file_list
75 68
}
76 69

  
......
78 71
    while IFS=, read -r file main opts
79 72
    do
80 73
	name=`basename "$file" .lus`
74
	ext=".lus"
81 75
	if [ `dirname "$file"`/"$name" = "$file" ]; then
82
	    return 0
76
	    name=`basename "$file" .lusi`
77
	    ext=".lusi"
83 78
	fi
84 79
	dir=${SRC_PREFIX}/`dirname "$file"`
85

  
86 80
	pushd $dir > /dev/null
87 81

  
88
# Checking inlining
89
    $LUSTREC -d $build -verbose 0 $opts -inline -witnesses -node $main "$name".lus;
90
    if [ $? -ne 0 ]; then
91
        rlustrec2="INVALID";
92
    else
93
        rlustrec2="VALID"
94
    fi
95
    pushd $build > /dev/null
96
    gcc -c -Wall -Wno-unused-but-set-variable -I ../../include/ "$name".c > /dev/null
97
    if [ $? -ne 0 ]; then
98
        rgcc2="INVALID";
99
    else
100
        rgcc2="VALID"
101
    fi
102
    popd > /dev/null
103
    if [ $verbose -gt 0 ]; then
104
	echo "lustrec inlined ($rlustrec2), gcc ($rgcc2), $dir, ${name}.lus, node $main" | column -t -s',' | tee -a $report;
105
    else
106
	echo "lustrec inlined ($rlustrec2), gcc ($rgcc2), $dir, ${name}.lus, node $main" | column -t -s',' | tee -a $report | grep "INVALID\|ERROR\|UNKNOWN"
107
    fi;
108
    popd > /dev/null
109
done < $file_list
82
	if [ "$main" != "" ]; then
83
	    lustrec_compile -d $build -verbose 0 $opts -inline -witnesses -node $main $name$ext;
84
	else
85
	    if [ "$ext" = ".lusi" ]; then
86
		lustrec_compile -d $build -verbose 0 $opts $name$ext;
87
	    else
88
		rlustrec="NONE"
89
		rgcc="NONE"
90
	    fi
91
	fi
92
	pushd $build > /dev/null
93

  
94
	if [ "$main" != "" ] && [ $ext = ".lus" ] && [ "$opts" != "-lusi" ]; then
95
	    gcc_compile "$name";
96
	else
97
	    rgcc="NONE"
98
	fi
99
	popd > /dev/null
100
	popd > /dev/null
101

  
102
	if [ $verbose -gt 0 ]; then
103
	    echo "lustrec inlined ($rlustrec), gcc ($rgcc), $dir, ${name}${ext}, node $main" | column -t -s',' | tee -a $report;
104
	else
105
	    echo "lustrec inlined ($rlustrec), gcc ($rgcc), $dir, ${name}${ext}, node $main" | column -t -s',' | tee -a $report | grep "INVALID\|ERROR\|UNKNOWN"
106
	fi;
107
    done < $file_list
110 108
}
111 109

  
112 110
inline_compile_with_check () {
......
119 117
	fi
120 118
	dir=${SRC_PREFIX}/`dirname "$file"`
121 119
	pushd $dir > /dev/null
122
    $LUSTREC -d $build -verbose 0 $opts -inline -witnesses -node $main "$name".lus;
123
    if [ $? -ne 0 ]; then
124
        rlustrec2="INVALID";
125
    else
126
        rlustrec2="VALID"
127
    fi
120
    lustrec_compile -d $build -verbose 0 $opts -inline -witnesses -node $main $name".lus"
121

  
128 122
    pushd $build > /dev/null
129
    gcc -c -Wall -Wno-unused-but-set-variable -I ../../include/ "$name".c > /dev/null
130
    if [ $? -ne 0 ]; then
131
        rgcc2="INVALID";
132
    else
133
        rgcc2="VALID"
134
    fi
123
    gcc_compile "$name"
124
	
135 125
    popd > /dev/null
136 126
	# Cheching witness
137 127
    pushd $build > /dev/null
138
    $LUSTREC -verbose 0 -horn-traces -d $build/${name}_witnesses -node check $build/${name}_witnesses/inliner_witness.lus
128
    lustrec_compile -verbose 0 -horn-traces -d $build/${name}_witnesses -node check $build/${name}_witnesses/inliner_witness.lus 
139 129
    popd > /dev/null
140 130
    z3="`z3 -T:10 $build/${name}_witnesses/inliner_witness.smt2 | xargs`"
141 131
    if [ "x`echo $z3 | grep unsat`" == "xunsat" ]; then
......
146 136
	rinlining="UNKNOWN";
147 137
    else
148 138
	rinlining="INVALID/TIMEOUT"
149
    fi
139
    fi  
150 140
    if [ $verbose -gt 0 ]; then
151
	echo "lustrec inlined ($rlustrec2), gcc ($rgcc2), inlining valid ($rinlining), $dir, ${name}.lus, node $main" | column -t -s',' | tee -a $report;
141
	echo "lustrec inlined ($rlustrec), gcc ($rgcc), inlining valid ($rinlining), $dir, ${name}.lus, node $main" | column -t -s',' | tee -a $report;
152 142
    else
153
	echo "lustrec inlined ($rlustrec2), gcc ($rgcc2), inlining valid ($rinlining), $dir, ${name}.lus, node $main" | column -t -s',' | tee -a $report | grep "INVALID\|ERROR\|UNKNOWN"
143
	echo "lustrec inlined ($rlustrec), gcc ($rgcc), inlining valid ($rinlining), $dir, ${name}.lus, node $main" | column -t -s',' | tee -a $report | grep "INVALID\|ERROR\|UNKNOWN"
154 144
    fi
155 145
    popd > /dev/null
156 146
done < $file_list
......
166 156
	fi
167 157
	dir=${SRC_PREFIX}/`dirname "$file"`
168 158
	pushd $dir > /dev/null
169

  
159
	
170 160
    # Checking horn backend
171 161
    if [ "$main" != "" ]; then
172
	$LUSTREC -horn-traces -horn-queries -d $build -verbose 0 $opts -node $main "$name".lus;
173
    else
174
	$LUSTREC -horn-traces -horn-queries -d $build -verbose 0 $opts "$name".lus
175
    fi
176
    if [ $? -ne 0 ]; then
177
        rlustrec="INVALID";
162
	lustrec_compile -horn-traces -horn-queries -d $build -verbose 0 $opts -node $main $name".lus";
178 163
    else
179
        rlustrec="VALID"
164
	lustrec_compile -horn-traces -horn-queries -d $build -verbose 0 $opts $name".lus"
180 165
    fi
181
    # echo "z3 $build/$name".smt2
166

  
167
    # echo "z3 $build/$name".smt2 
182 168
    # TODO: This part of the script has to be optimized
183 169
    z3 -T:10 "$build/$name".smt2 | grep unsat > /dev/null
184 170
    if [ $? -ne 0 ]; then
......
195 181
done < $file_list
196 182
}
197 183

  
198
check_horn () {
199
    while IFS=, read -r file main opts
200
    do
201
	name=`basename "$file" .lus`
202
	if [ "$name" = "$file" ]; then
203
	    return 0
204
	fi
205
	dir=${SRC_PREFIX}/`dirname "$file"`
206
	pushd $dir > /dev/null
207

  
208
    # Checking horn backend
209
    if [ "$main" != "" ]; then
210
	$LUSTREC -horn-traces -horn-queries -d $build -verbose 0 $opts -node $main "$name".lus;
211
    else
212
	$LUSTREC -horn-traces -horn-queries -d $build -verbose 0 $opts "$name".lus
213
    fi
214
    if [ $? -ne 0 ]; then
215
        rlustrec="INVALID";
216
    else
217
        rlustrec="VALID"
218
    fi
219
    if [ $verbose -gt 0 ]; then
220
	echo "lustrec ($rlustrec), $dir, ${name}.lus, node $main" | column -t -s',' | tee -a $report;
221
    else
222
	echo "lustrec ($rlustrec), $dir, ${name}.lus, node $main" | column -t -s',' | tee -a $report | grep "INVALID\|ERROR\|UNKNOWN"
223
    fi
224
    popd > /dev/null
225
done < $file_list
226
}
227

  
228 184
usage () {
229 185
echo "usage: $0 [-aciwh] file_list"
230 186
echo "-a: perform all steps"
......
232 188
echo "-i: compile with inline mode"
233 189
echo "-w: compile with inline mode. Check the inlining with z3"
234 190
echo "-h: check files with the horn-pdf backend (requires z3)"
235
echo "-r: regression test for horn backend"
236 191
echo "-v <int>: verbose level"
237 192
}
238 193

  
......
246 201
                -c) nobehavior=0; c=1 ; shift ;;
247 202
                -i) nobehavior=0; i=1 ; shift ;;
248 203
                -w) nobehavior=0; w=1 ; shift ;;
249
                -r) nobehavior=0; r=1 ; shift ;;
250 204
                -h) nobehavior=0; h=1 ; shift ;;
251 205
                --) shift ;;
252 206
                -*) echo "bad option '$1'" ; exit 1 ;;
......
263 217
    exit 1
264 218
fi
265 219

  
220
# cleaning directory $build
221

  
222
rm -f "$build"/* 2> /dev/null
223

  
224
# executing tests
225

  
266 226
[ ! -z "$c" ] && base_compile
267 227
[ ! -z "$i" ] && inline_compile
268 228
[ ! -z "$w" ] && inline_compile_with_check
269 229
[ ! -z "$h" ] && check_prop
270
[ ! -z "$r" ] && check_horn
271 230
[ "$nobehavior" -eq 1 ] && echo "Must provide an argument in [aciwh]" && usage
272 231

  
273 232

  
......
276 235
	#if [ $? -ne 1 ];then
277 236
	#  rm ../${file}i
278 237
	#fi
238

  
test/tests_ok.list
894 894
./tests/kind_fmcad08/large/ccp20.lus,top
895 895
./tests/kind_fmcad08/large/ccp11.lus,top
896 896
./tests/kind_fmcad08/large/cruise_controller_21.lus,top
897
./tests/tuples/tuples1.lus
898
./tests/tuples/tuples2.lus
897 899
./tests/arrays_arnaud/dummy_lib.lusi
898 900
./tests/arrays_arnaud/arrays.lus,,-check-access
899 901
./tests/arrays_arnaud/RelOpMatrix.lus
900 902
./tests/arrays_arnaud/access1.lus,,-check-access
903
./tests/arrays_arnaud/generic1.lus,,-lusi
904
./tests/arrays_arnaud/generic1.lusi
901 905
./tests/arrays_arnaud/generic1.lus
902 906
./tests/arrays_arnaud/generic2.lus
903 907
./tests/arrays_arnaud/generic3.lus,top,-dynamic -check-access
908
./tests/clocks/clocks1.lus,,-lusi
909
./tests/clocks/clocks1.lusi
904 910
./tests/clocks/clocks1.lus
905 911
./tests/clocks/clocks2.lus
912
./tests/clocks/clocks6.lus
913
./tests/clocks/clocks7.lus
914
./tests/clocks/clocks8.lus
915
./tests/clocks/clocks9.lus
916
./tests/clocks/oversampling0.lus,,-lusi
917
./tests/clocks/oversampling0.lusi
906 918
./tests/clocks/oversampling0.lus
907 919
./tests/lusic/test2.lusi
908 920
./tests/lusic/test1.lusi
909 921
./tests/lusic/test1.lus,as_soon_as
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff