Skip to content
Snippets Groups Projects
Commit 07e4781a authored by Erwan Jahier's avatar Erwan Jahier
Browse files

Some progress in the non-regression tests: add an EvalNode.f that

currently only evaluates predef nodes.
parent ac8cab28
No related branches found
No related tags found
No related merge requests found
...@@ -35,6 +35,8 @@ SOURCES = \ ...@@ -35,6 +35,8 @@ SOURCES = \
./evalConst.ml \ ./evalConst.ml \
./evalType.mli \ ./evalType.mli \
./evalType.ml \ ./evalType.ml \
./evalNode.mli \
./evalNode.ml \
./lazyCompiler.ml \ ./lazyCompiler.ml \
./lazyCompiler.mli \ ./lazyCompiler.mli \
./compile.ml \ ./compile.ml \
......
(** Time-stamp: <modified the 12/02/2008 (at 11:05) by Erwan Jahier> *) (** Time-stamp: <modified the 20/02/2008 (at 16:04) by Erwan Jahier> *)
open Printf open Printf
...@@ -312,8 +312,19 @@ let op_computer (posop : predef_node) (src: Lxm.t) ...@@ -312,8 +312,19 @@ let op_computer (posop : predef_node) (src: Lxm.t)
) )
| [x] -> type_error [x] "struct type" | [x] -> type_error [x] "struct type"
| x -> arity_error x "1" | x -> arity_error x "1"
) | )
_ -> assert false | ITERATOR_n _ -> assert false
| MERGE_n _ -> assert false
| ARRAY_SLICE_n _ -> assert false
| ARRAY_ACCES_n _ -> assert false
| PROJ_n _ -> assert false
| ARRAY_n -> assert false
| TUPLE_n -> assert false
| WITH_n -> assert false
| CONCAT_n -> assert false
| HAT_n -> assert false
| FBY_n -> assert false
| NULL_exp -> assert false
) )
(*---------------------------------------------------- (*----------------------------------------------------
......
(** Time-stamp: <modified the 20/02/2008 (at 16:06) by Erwan Jahier> *)
open SyntaxTree
open SyntaxTreeCore
open CompiledData
let rec (f : CompiledData.id_solver -> SyntaxTreeCore.node_exp ->
CompiledData.node_eff) =
fun id_solver ne ->
match ne with
| CallPreDef predef_node -> PredefEff predef_node
| CallUsrDef (idref, static_args) -> assert false
(** Time-stamp: <modified the 20/02/2008 (at 15:29) by Erwan Jahier> *)
val f : CompiledData.id_solver -> SyntaxTreeCore.node_exp -> CompiledData.node_eff
(** Time-stamp: <modified the 20/02/2008 (at 15:23) by Erwan Jahier> *) (** Time-stamp: <modified the 20/02/2008 (at 15:41) by Erwan Jahier> *)
open Lxm open Lxm
...@@ -649,11 +649,9 @@ and (check_static_arg : CompiledData.id_solver -> ...@@ -649,11 +649,9 @@ and (check_static_arg : CompiledData.id_solver ->
TypeStaticArgEff (id, teff) TypeStaticArgEff (id, teff)
| StaticArgNode(ne), StaticParamNode(id,_,_,_)-> | StaticArgNode(ne), StaticParamNode(id,_,_,_)->
finish_me (" node parameter handling "); let neff = EvalNode.f node_id_solver ne in
(* let neff = EvalNode.f node_id_solver ne in *) NodeStaticArgEff (id, neff)
(* NodeStaticArgEff (id, neff) *)
assert false
| StaticArgType _, StaticParamNode(id,_,_,_) | StaticArgType _, StaticParamNode(id,_,_,_)
| StaticArgType _, StaticParamConst(id,_) | StaticArgType _, StaticParamConst(id,_)
...@@ -665,7 +663,7 @@ and (check_static_arg : CompiledData.id_solver -> ...@@ -665,7 +663,7 @@ and (check_static_arg : CompiledData.id_solver ->
| StaticArgConst _, StaticParamType(id) | StaticArgConst _, StaticParamType(id)
-> ->
finish_me "write a nice error message!"; finish_me "write a nice error message!";
assert false assert false (* can it occur? *)
in in
sa_eff sa_eff
......
...@@ -172,11 +172,12 @@ End of Syntax table dump. ...@@ -172,11 +172,12 @@ End of Syntax table dump.
Exported constants: Exported constants:
Exported nodes: Exported nodes:
### skipping fold_left ### skipping fold_left
node dummy::consensus_6_bis = dummy::fold_left<<type bool, type bool, const 6, operator and>>(bool, bool^6) returns (bool) on clock XXX
XXX LazyCompiler: node parameter handling -> finish me! node dummy::consensus_6 = dummy::consensus_6(bool^6) returns (bool) on clock XXX
*** oops: an internal error occurred in file lazyCompiler.ml, line 655, column 5 ### skipping consensus_bis
*** when compiling lustre program t2.lus ### skipping consensus
---------------------------------------------------------------------- ----------------------------------------------------------------------
====> ../lus2lic -vl 3 test.lus ====> ../lus2lic -vl 3 test.lus
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment