summary refs log tree commit diff
path: root/source/mod_student/constant_folding_analysis.ml
blob: 40419ccf17b07155900c27196f9be368df97f3f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
open Xi_lib
open Ir
open Ir_utils

module Make() = struct

  module Implementation(M:sig
      val cfg: ControlFlowGraph.t
      val initial: Analysis_domain.ConstantFolding.domain
    end) = struct

    open M

    let analyse () = 
      failwith "not yet implemented"
  end



  (* Skontruuj wartość ekstremalną *)
  let make_initial n =
    failwith "not yet implemented"

  let analyse proc : Xi_lib.Analysis_domain.ConstantFolding.table =
    let initial = make_initial @@ Ir.formal_parameters_of_procedure proc in
    let cfg = Ir.cfg_of_procedure proc in
    let module Instance = Implementation(struct let cfg = cfg let initial = initial end) in 
    let result = Instance.analyse () in
    result

end