Static_exps should be in types. field name of ops is a param.

This commit is contained in:
Léonard Gérard 2010-07-05 12:13:57 +02:00 committed by Cédric Pasteur
parent 037f9be664
commit 5cc57cd3b0
3 changed files with 17 additions and 16 deletions

View file

@ -17,16 +17,6 @@
open Names
open Format
type static_exp =
| Svar of name
| Sint of int
| Sfloat of float
| Sbool of bool
| Sconstructor of longname
| Stuple of static_exp list
| Sarray_power of static_exp * static_exp (** power : 0^n : [0,0,0,0,0,..] *)
| Sarray of static_exp list (** [ e1, e2, e3 ] *)
| Sop of longname * static_exp list (** defined ops for now in pervasives *)
(** Constraints on size expressions. *)
type size_constraint =

View file

@ -6,15 +6,26 @@
(* Organization : Demons, LRI, University of Paris-Sud, Orsay *)
(* *)
(**************************************************************************)
open Static
open Names
type ty =
| Tprod of ty list | Tid of longname | Tarray of ty * static_exp
type ty = | Tprod of ty list | Tid of longname | Tarray of ty * static_exp
type static_exp = { se_desc: static_exp_desc; se_typ: loc: location }
| Svar of name
| Sint of int
| Sfloat of float
| Sbool of bool
| Sconstructor of longname
| Stuple of static_exp list
| Sarray_power of static_exp * static_exp (** power : 0^n : [0,0,0,0,0,..] *)
| Sarray of static_exp list (** [ e1, e2, e3 ] *)
| Sop of longname * static_exp list (** defined ops for now in pervasives *)
let invalid_type = Tprod []
let const_array_of ty n = Tarray (ty, Sconst n)
let const_array_of ty n = Tarray (ty, SConst n) (* TODO ??? *)
open Pp_tools
open Format

View file

@ -62,8 +62,8 @@ and op =
| Efun of longname (** "Stateless" longname <<a_params>> (args) reset r *)
| Enode of longname (** "Stateful" longname <<a_params>> (args) reset r *)
| Eifthenelse (** if arg1 then arg2 else arg3 *)
| Efield of longname (** arg1.longname *)
| Efield_update of longname (** { arg1 with longname = arg2 } *)
| Efield (** arg1.a_param1 *)
| Efield_update (** { arg1 with a_param1 = arg2 } *)
| Earray (** [ args ] *)
| Earray_fill (** [arg1^arg2] *)
| Eselect (** arg1[a_params] *)