open Types;;
open Value;;
-(* EXCEPTIONS *)
-(** Exception raised in beam matching of faust expressions.*)
-exception Beam_Matching_Error of string;;
-
-(** Exception raised in case that the branch under call hasn't yet been programed.*)
exception NotYetDone;;
+
+class virtual expression : expression_type =
+ fun (exp_init : faust_exp) ->
+ object
+ val exp = exp_init
+ val dim = new dimension
+ val delay = 0
+ method get_exp = exp
+ method get_dim = dim
+ method get_delay = delay
+ method to_string = "NotYetDone"
+ method virtual evaluate : beam_type -> beam_type
+end;;
+
+
+class exp_const =
+ object
+ inherit expression
+ method evaluate = fun b1 ->
+
+ end;;
+
+
+class exp_ident =
+ object
+ inherit expression
+
+ end;;
+
+
+class exp_par =
+ object
+ inherit expression
+
+ end;;
+
+
+class exp_split =
+ object
+ inherit expression
+
+ end;;
+
+
+class exp_merge =
+ object
+ inherit expression
+
+ end;;
+
+class exp_seq =
+ object
+ inherit expression
+
+ end;;
+
+class exp_rec =
+ object
+ inherit expression
+
+ end;;
+
+
+
+
+
+
(* PROCESS DELAY ESTIMATION *)
(** val delay : faust_exp -> int, returns the number of delays estimated staticly.
|Floor -> 0
|Int -> 0
|Sin -> 0
- |Cos -> 0
- |Atan -> 0
- |Atantwo -> 0
- |Sqrt -> 0
|Rdtable -> 100000 (* danger! *)
|Mod -> 0
|Larger -> 0
|Floor -> End (1, 1)
|Int -> End (1, 1)
|Sin -> End (1, 1)
- |Cos -> End (1, 1)
- |Atan -> End (1, 1)
- |Atantwo -> End (2, 1)
- |Sqrt -> End (1, 1)
|Rdtable -> End (3, 1)
|Mod -> End (2, 1)
|Vectorize -> End (2, 1)