diff --git a/flap/src/hopix/hopixInterpreter.ml b/flap/src/hopix/hopixInterpreter.ml index d0f6ac2..b0588f0 100644 --- a/flap/src/hopix/hopixInterpreter.ml +++ b/flap/src/hopix/hopixInterpreter.ml @@ -381,9 +381,10 @@ and expression _pos environment _memory = function | Field _ -> (* TODO *) failwith "Students! This is your job (Field)!" - | Tuple _ -> - (* TODO *) - failwith "Students! This is your job (Tuple)!" + | Tuple([]) -> (* Cas pour le Tuple vide *) + VUnit (* Un tuple vide ne contient rien (logique), donc on utilise un VUnit*) + | Tuple(list_exp) -> + VTuple(List.map (expression' environment _memory) list_exp) | Sequence _ -> (* TODO *) failwith "Students! This is your job (Sequence)!" @@ -396,9 +397,9 @@ and expression _pos environment _memory = function | Apply _ -> (* TODO *) failwith "Students! This is your job (Apply)!" - | Ref _ -> - (* TODO *) - failwith "Students! This is your job (Ref)!" + | Ref ref -> + let dref = expression' environment _memory ref in + VLocation(Memory.allocate _memory Mint.one dref) | Assign _ -> (* TODO *) failwith "Students! This is your job (Assign)!"