Guest User

Untitled

a guest
Jul 31st, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 22.61 KB | None | 0 0
  1. (*********************************BLOC DE FONCTION EN VRAC (REUTILISABLES)*************************************)
  2. let string_of_char = fun a ->
  3.     String.make 1 a;;
  4.  
  5. let rec aux2 l elem res2 = match l with
  6.     []->res2
  7.     |h::t-> aux2 t elem ((elem^h)::res2) ;;
  8.    
  9. let produitCartesien l1 l2 =
  10.     let rec aux l1 l2 res = match l1 with
  11.         []->res
  12.         |h::t-> aux t l2 res@(aux2 l2 h [])
  13.     in aux l1 l2 [] ;;
  14.  
  15. let rec appartient l arg = match l with
  16.     []->false
  17.     |h::t-> if h=arg then true
  18.             else appartient t arg
  19.     ;;
  20.  
  21. let concatFiltrage l1 l2 =
  22.     let rec aux tl1 res = match tl1 with
  23.         []->res
  24.         |h::t-> if (appartient res h)
  25.                     then aux t res
  26.                     else aux t (h::res)
  27.     in aux l1 l2
  28. ;;
  29.  
  30.  
  31. (**********************************BLOC DE LECTURE ET D ANALYSE DES VARIABLES**********************************)
  32.  
  33.    
  34. let lecture s =
  35.     let rec aux s2 var = match s2 with    (*compte le nombre de variable*)
  36.         ""-> var
  37.         |a-> if ((String.get a 0)!='+' && (String.get a 0)!='.' && (String.get a 0)!='!') then(*pas un opérateur*)
  38.                     if (appartient var (String.get a 0)) then aux (String.sub a 1 ((String.length a)-1)) var (*h € var go *)
  39.                     else aux (String.sub a 1 ((String.length a)-1)) (var@[(String.get a 0)]) (*on rajoute h à var *)
  40.                 else aux (String.sub a 1 ((String.length a)-1)) var
  41.         in aux s [] ;;
  42.  
  43. let lectureString s = List.map (string_of_char) (lecture s) ;;        
  44.  
  45. (**********************************BLOC DE GESTION DE COMPLETION D UN MOT**********************************)
  46.  
  47. (************SOUS BLOC DE DETECTION DES VARIABLES MANQUANTES
  48.              ET CREATION DES LISTES CORRESPONDANTES***********)
  49. let soustraction mot var =
  50.     let rec aux mot var res = match var with
  51.         []->res
  52.         |h::t-> if (String.contains mot h) then aux mot t res (*rentre toujours ici*)
  53.                 else aux mot t (h::res)
  54.     in aux mot var [] ;;
  55.  
  56. let preparation manquants = (*prends liste de char manquants et renvoit liste de liste(binome) contenant une var et son opposé
  57.                              ex ['a';'b']->[ ["a";"!a"] ; ["b";"!b"] ]*)
  58.     let rec aux l res = match l with
  59.         []->res
  60.         |h::t-> aux t (((String.make 1 h)::("!"^(String.make 1 h))::[])::res)
  61.     in aux manquants [] ;;
  62.  
  63.  
  64. (************SOUS BLOC DE CREATION DES PERMUTATIONS***********)
  65.  
  66. let rec permutationBinaire l =
  67.     let rec aux l2 res = match l2 with
  68.         []->[]
  69.         |h::t-> if (t!=[]) then aux t ((produitCartesien res (List.hd t)))
  70.                 else res
  71.     in aux l (List.hd l) ;;
  72. (* permutationBinaire [ ["a";"!a"] ; ["b";"!b"] ; ["c";"!c"] ]
  73. <=>(produitCartesien ["c";"!c"] (produitCartesien ["a";"!a"] ["b";"!b"])) ;;
  74. => renvoit une string list de toutes les permutations binaires *)
  75.  
  76. (********SOUS BLOC D ASSEMBLAGE DU MOT ET DES PERMS****)
  77.  
  78. let add s l = (*concat d'une string sur tout les elements d'une list -> renvoit une liste de mot a ajouté à la phrase *)
  79.     let rec aux l2 res = match l2 with
  80.         []->res
  81.         |h::t-> aux t ((h^s)::res)
  82.     in aux l [] ;;
  83.    
  84. (*********ASSEMBLAGE DE TOUT LES SOUS BLOCS************)
  85.  
  86. let completion mot var = (* prends en entrée le tableau de chars des variables, et une string correspondant au mot à compléter *)
  87.     add mot (permutationBinaire (preparation (soustraction mot var) ) ) ;;
  88. (* utilisation: completion "a" ['a';'b';'c';'d'] ;; *)
  89.  
  90.  
  91.  
  92.        
  93. (**********************************BLOC DE COMPLETION DE LA PHRASE**************************************)
  94.  
  95. let rec appartenance s l = match l with (*vérifie que toutes les caractères de l ou leurs négations sont dans s *)
  96.     []->true
  97.     |h::t-> if (String.contains s h=false) then false
  98.          else appartenance s t
  99.  
  100. let conversionDijonctive sDepart =
  101.     let rec aux var s mot res = match s with
  102.         ""->res
  103.         |a->begin
  104.             match (String.get a 0 ) with
  105.                 '+'-> begin
  106.                         match (appartenance mot var) with
  107.                             true->(* Si mot Contient toutes les vars/leurs négations *)
  108.                                 aux var ( String.sub s 1 ((String.length s)-1) ) (* <=>reste de s *)  ""(* on démarre un nouveau mot=>nouvelle String *) (mot::res)(* on ajoute le mot à res *)
  109.                             |false-> aux var ( String.sub s 1 ((String.length s)-1) )(* <=>reste de s *)  ""(* on démarre un nouveau mot=>nouvelle String *) (concatFiltrage (completion mot var) res)(* pas de (completion mot var)@res car il faut filtrer les doubles aussi => renverser les lettres avants à l'aide d'une fonction String.reverser (à coder, merci inria) *) (*complétion du mot*)
  110.                       end
  111.                 |'!'-> aux var ( String.sub s 2 ((String.length s)-2) )(* <=>reste de s *) (mot^(String.sub a 0 1)^(String.sub a 1 1))(* on continue de construire le mot en prenant deux lettres car on tombe sur une négation *) res
  112.                 |_-> aux var ( String.sub s 1 ((String.length s)-1) )(* <=>reste de s *) (mot^(String.sub a 0 1))(* on continue de construire le mot *) res
  113.             end
  114.     in aux (lecture sDepart) (sDepart^"+") "" [] ;; (* sDepart^"+" pour gérer le cas abcd+a sinon a ne sera pas compléter*)
  115.    
  116.  
  117.    
  118.    
  119.    
  120.    
  121.         let string_of_char = fun a ->
  122.     String.make 1 a;;
  123.  
  124.     let exclusive_or = fun a b ->
  125.     if a=b
  126.             then "0"
  127.             else "1"
  128.     ;;
  129.  
  130.     (*conversion de décimal en binaire*)
  131.     let rec bin_of_dec_root = fun nb_dec ->
  132.             if nb_dec = 0 then
  133.                     ""
  134.                     else
  135.                     (bin_of_dec_root (nb_dec/2))^(string_of_int (nb_dec mod 2));;
  136.      
  137.     let rec add_zeros = fun string nb_of_zeros ->
  138.             if nb_of_zeros = 0 then string
  139.             else
  140.             add_zeros ("0"^string) (nb_of_zeros-1)
  141.             ;;
  142.     let bin_of_dec = fun nb_bt nb_dec ->
  143.             let result = bin_of_dec_root nb_dec in
  144.             add_zeros result (nb_bt-(String.length result))
  145.             ;;
  146.      
  147.            
  148.     let gray_of_bin = fun bin_string ->
  149.     let rec aux = fun index gray_string ->
  150.                     if index>=(String.length bin_string) then gray_string
  151.                     else
  152.                     aux (index+1) (gray_string^(exclusive_or (String.get bin_string (index-1)) (String.get bin_string index)))
  153.     in aux 1 (string_of_char(String.get bin_string 0))
  154.     ;;    
  155.            
  156.     let gray_of_dec = fun nb_dec nb_bit->
  157.             gray_of_bin (bin_of_dec nb_bit nb_dec)
  158.             ;;
  159.      
  160.     (*placer ici fst de split list_arg ou snd de split list_arg*)
  161.     let rec get_gray = fun word list_arg ->
  162.             match list_arg with
  163.             [] -> ""
  164.             |h::t -> let  index = (String.index word (String.get h 0)) in
  165.                                     if index>0 then
  166.                                             if (String.get word (index-1))='!'
  167.                                                     then "0"^(get_gray word t)
  168.                                                     else "1"^(get_gray word t)
  169.                                             else "1"^(get_gray word t)
  170.     ;;
  171.      
  172.     let bin_of_gray = fun gray_string ->
  173.     let rec aux = fun index bin_string ->
  174.                     if index>=(String.length gray_string) then bin_string
  175.                     else
  176.                     aux (index+1) (bin_string^(exclusive_or (String.get bin_string (index-1)) (String.get gray_string index)))
  177.     in aux 1 (string_of_char(String.get gray_string 0))
  178.     ;;
  179.      
  180.     let rec int_of_bin = fun bin_string ->
  181.             if (String.length bin_string)>=1
  182.                     then
  183.                     if ((String.get bin_string 0)='1')
  184.                             then
  185.                             (int_of_float (2.**(float_of_int ((String.length bin_string)-1))))+int_of_bin ( String.sub bin_string 1 ((String.length bin_string)-1))
  186.                             else
  187.                             int_of_bin ( String.sub bin_string 1 ((String.length bin_string)-1))
  188.             else 0
  189.     ;;
  190.      
  191.     let get_index = fun word list_arg ->
  192.             int_of_bin( bin_of_gray ( get_gray word list_arg));;
  193.      
  194.            
  195.     (*récupération en utilisant des coordonnées*)
  196.     let get_expr = fun nb_gray list_arg ->
  197.             let rec aux = fun ret nb list_arg ->
  198.                     if nb="" then
  199.                             ret
  200.                             else
  201.                                     let variable =  (if (String.get nb 0)='1' then "" else "!") in
  202.                                     aux (ret^variable^(List.hd list_arg)) (String.sub nb 1 ((String.length nb)-1)) (List.tl list_arg)
  203.             in aux "" nb_gray list_arg;;
  204.     (*attention liste d'arguments splittée*)
  205.     (*récupère un mot en utilisant des coordonnées*)
  206.     let get_word = fun coord list_arg ->
  207.     (get_expr (gray_of_dec(fst coord) (List.length (fst list_arg))) (fst list_arg))^(get_expr (gray_of_dec(snd coord) (List.length (snd list_arg))) (snd list_arg))
  208.     ;;    
  209.     (*affect en utilisant du code gray*)
  210.      
  211.     let affect2 = fun word list_arg table ->
  212.             let rec aux = fun index table ->
  213.                     if index = 0 then
  214.                             match table with
  215.                             [h] -> [1]
  216.                             |h::t -> 1::t
  217.                     else
  218.                             (List.hd table) :: (aux (index-1) (List.tl table))
  219.             in aux (get_index word (snd list_arg)) table
  220.     ;;
  221.     let affect = fun word list_arg table ->
  222.             let rec aux = fun index table ->
  223.                     if index = 0 then
  224.                             (affect2 word list_arg (List.hd table))::(List.tl table)
  225.                             else
  226.                            
  227.                             (List.hd table) :: (aux (index -1) (List.tl table))
  228.                     in aux (get_index word (fst list_arg)) table;;
  229.                    
  230.     let rec create_table = fun list_word list_arg table ->
  231.             match list_word with
  232.                     []->table
  233.                     |h::t-> create_table t  list_arg (affect h list_arg table)
  234.     ;;
  235.      
  236.     (*nombre de colonnes et de lignes en fonction du nombre d'arguments*)
  237.     let rec create_column = fun nb_lignes content ->
  238.             if nb_lignes = 0
  239.                     then
  240.                     []
  241.                     else
  242.                     [content]@create_column (nb_lignes-1) content
  243.     ;;
  244.     (* old, bugée
  245.     let init_tab = fun list_arg content ->
  246.             let rec aux = fun nb_colonnes nb_lignes content ->
  247.                     if nb_colonnes = 0
  248.                             then    
  249.                             []
  250.                             else
  251.                             (create_column nb_lignes content) :: aux (nb_colonnes-1) nb_lignes content
  252.             in
  253.             let     nb_colonnes = int_of_float (2.**(float_of_int((List.length list_arg)/2))) in
  254.             let nb_lignes =         if ((List.length list_arg) mod 2) = 0
  255.                                                     then
  256.                                                     int_of_float (2.**(float_of_int((List.length list_arg)/2)))
  257.                                                     else
  258.                                                     int_of_float (2.**(float_of_int(((List.length list_arg)/2)-1)))
  259.             in
  260.                     aux nb_colonnes nb_lignes content
  261.             ;;
  262.     *)
  263.    
  264.     let init_tab = fun list_arg content ->
  265.             let rec aux = fun nb_colonnes nb_lignes content ->
  266.                     if nb_colonnes = 0
  267.                             then    
  268.                             []
  269.                             else
  270.                             (create_column nb_lignes content) :: aux (nb_colonnes-1) nb_lignes content
  271.             in
  272.             let     nb_colonnes = int_of_float (2.**(float_of_int(List.length (fst list_arg)))) in
  273.             let         nb_lignes = int_of_float (2.**(float_of_int (List.length (snd list_arg))))
  274.             in
  275.                     aux nb_colonnes nb_lignes content
  276.             ;;
  277.  
  278.      
  279.      
  280.     let decompose = fun s ->
  281.             let rec aux = fun s return ->
  282.                     if (String.contains s '+') then
  283.                     let borne = (String.index s '+') in aux (String.sub s (borne+1) ((String.length s)-(borne+1))) (return@[(String.sub s 0 borne)])
  284.                     else
  285.                     return@[s]
  286.             in aux s []
  287.     ;;
  288.      
  289.     let split = fun li ->
  290.     let length = List.length li in let enum = (length/2)+((mod) length 2) in
  291.     let rec aux = fun li li2 it ->
  292.             if it = 0 then (li, li2) else aux (li@[(List.hd li2)]) (List.tl li2) (it-1)
  293.     in aux [] li enum;;
  294.      
  295.     let rec print_line = fun list->
  296.     match list with
  297.     []->"\n"
  298.     |h::t-> h^" "^(print_line t);;
  299.      
  300.     let print_table = fun table ->
  301.     let rec aux = fun table s ->
  302.     match table with
  303.     []->print_string s
  304.     |h::t -> aux t (s^(print_line h))
  305.     in aux table "";;
  306.      
  307.     let get_value = fun coord table ->
  308.             List.nth (List.nth table (fst coord)) (snd coord);;
  309.      
  310.     (*sondageV*)
  311.     let sonde_verticale = fun coord table ->
  312.             let rec aux = fun coord looped ret ->
  313.                     if (snd coord) >= (List.length (List.hd table)) then
  314.                             if (looped) then ret
  315.                                     else aux ((fst coord), 0) true ret
  316.                             else
  317.                                     if (get_value coord table)=1 then aux ((fst coord),((snd coord)+1)) looped (ret+1)
  318.                                             else ret
  319.             in let line = aux coord false 0 in
  320.                     if line<(List.length (List.hd table)) then line
  321.                             else (List.length (List.hd table));;
  322.     (*sondageH*)
  323.     let sonde_horizontal = fun coord table ->
  324.             let rec aux = fun coord looped ret ->
  325.                     if (fst coord) >= (List.length table) then
  326.                             if (looped) then ret
  327.                                     else aux (0, (snd coord)) true ret
  328.                             else
  329.                                     if (get_value coord table)=1 then aux (((fst coord)+1),(snd coord)) looped (ret+1)
  330.                                             else ret
  331.             in let line = aux coord false 0 in
  332.                     if line<(List.length table) then line
  333.                             else (List.length table);;
  334.      
  335.      
  336.      
  337.     (*partie explore*)
  338.      let pow = fun nb ->
  339.             let rec aux = fun i tmp ->
  340.         if (  (2.0 ** ( float_of_int((tmp+1)) )) > (float_of_int i)  )
  341.             then tmp
  342.         else aux i (tmp+1)
  343.             in aux nb 0;;
  344.     let pow2 = fun nb -> int_of_float (2.0**(float_of_int (pow nb))) ;;
  345.      
  346.     let min_list = fun list ->
  347.             let rec aux = fun min list ->
  348.                     match list with
  349.                             [] -> min
  350.                             |h::t -> let min_loc = (if (min < h) then min else h) in aux min_loc t
  351.             in aux (List.hd list) list;;
  352.      
  353.     let get_liste = fun coord it taille_table->
  354.             let rec aux = fun coord it ret ->
  355.                     if it = 0
  356.                             then ret
  357.                             else let new_coord = ((fst coord), (if ((snd coord)+1)=taille_table then 0 else (snd coord)+1)) in
  358.                                     aux new_coord (it-1) (ret@[new_coord])
  359.             in aux coord (it-1) [coord];;
  360.      
  361.     let vary_col = fun coord nb_col taille->
  362.             let rec aux = fun list nb_col->
  363.                     if (nb_col = 0)
  364.                             then
  365.                                     list
  366.                             else let x = if ((fst (List.hd list))+1)<taille then (fst (List.hd list))+1 else 0 in
  367.                              aux (( x, snd (List.hd list))::list) (nb_col-1)
  368.             in aux [coord] nb_col;;
  369.            
  370.     let vary_line = fun coord nb_ligne taille->
  371.             let rec aux = fun list nb_ligne->
  372.                     if (nb_ligne = 0)
  373.                             then
  374.                                     list
  375.                             else let y = (if ((snd (List.hd list))+1)<taille then (snd (List.hd list))+1 else 0) in
  376.                             aux (((fst (List.hd list)), y)::list) (nb_ligne-1)
  377.             in aux [coord] nb_ligne;;
  378.            
  379.     let explore = fun coord table list_arg-> (*groupe*)
  380.             let line = sonde_verticale coord table in
  381.                     if line > 0 then
  382.                             let liste = get_liste coord (pow2 line) (List.length (List.hd table)) in
  383.                                     let min_h = min_list (List.map pow2 (List.map (fun x->sonde_horizontal x table) liste)) in
  384.                                             let min_v = pow2 line in
  385.                                                     let list_coord = List.map (fun x -> vary_col x (min_h-1) (List.length table)) (vary_line coord (min_v-1)(List.length (List.hd table))) in
  386.                                                             List.map (fun x-> get_word x list_arg) (List.flatten list_coord)
  387.                                    
  388.                     else [];;
  389.      
  390.      
  391.      
  392.      
  393.      let rec truc i tmp =
  394.     if (  (2.0 ** ( float_of_int((tmp+1)) )) > (float_of_int i)  )
  395.         then tmp
  396.     else truc i (tmp+1) ;;
  397. (*    
  398. let min_list = fun list ->
  399.     let rec aux = fun min list ->
  400.         match list with
  401.             [] -> min
  402.             |h::t -> let min_loc = (if min<h) then min else h) in aux min_loc t
  403.     in aux (List.hd list) list;;
  404. *)
  405.  
  406. let min_list = fun list ->
  407.     let rec aux = fun min list ->
  408.             match list with
  409.                     [] -> min
  410.                     |h::t -> let min_loc = (if (min < h) then min else h) in aux min_loc t
  411.     in aux (List.hd list) list;;
  412.    
  413. let head = fun nb list ->
  414.     let rec aux = fun nb list ret ->
  415.         if nb = 0
  416.             then ret
  417.             else aux (nb -1) (List.tl list) (ret@[(List.hd list)])
  418.     in aux nb list []
  419.  
  420.    
  421.    
  422.    
  423.    
  424.    
  425. (******************** Partie Filtrage ***************************)
  426.  
  427. let rec verifPresence = fun element table ->
  428.  match table with
  429.     []-> false
  430.     |h::t-> (h=element)|| (verifPresence element t)
  431. ;;
  432.  
  433. let rec verifGroupe = fun element table ->
  434. match table with
  435.         []-> false
  436.         |h::t -> (verifPresence element h) || (verifGroupe element t);;
  437.  
  438. let extraction = fun element list_group ->    
  439. let rec aux = fun list_group res -> match list_group with
  440.     []->res
  441.     |h::t-> let retour = (if ( (verifPresence element h ) && ((List.length h)>(List.length res)) ) then h else res) in
  442.             aux t retour
  443.         in aux list_group []
  444. ;;
  445. let parcoursFiltrage = fun tk list_group->
  446. let rec aux tk res = match tk with
  447.     []->res
  448.     |h::t->let ret =  (if ( verifGroupe h res ) then res else (extraction h list_group)::res) in
  449.                            aux t ret
  450.         in aux tk [[]]
  451. ;;
  452.      
  453.      
  454.      
  455.      
  456.      
  457.  
  458. (**************************Partie Traitement de la liste de groupe************************)
  459.  
  460. let firstLetter mot =(* fonction qui renvoit la 1 ere lettre d'un mot *)
  461.     if (String.get mot 0)='!'
  462.         then "!"^(String.make 1 (String.get mot 1))
  463.         else (String.make 1 (String.get mot 0))
  464.     ;;
  465.  
  466. let containsLetter = fun lettre string ->
  467.    if (String.length lettre) = 1 then
  468.       if (String.contains string (String.get lettre 0))
  469.         then if (String.index string (String.get lettre 0))>0
  470.             then
  471.                 not( (String.get string (((String.index string (String.get lettre 0)))-1)) = '!')
  472.             else true
  473.         else false
  474.    else
  475.       let rec aux = fun string ->
  476.          if String.contains string '!' then
  477.             ((String.get string ((String.index string '!')+1)) = (String.get lettre 1))||aux (String.sub string 1 ((String.length string)-1))
  478.             else false
  479.       in aux string;;
  480.  
  481.  
  482. let rec appartient firstLetterHtmp autreMots b =
  483.     match autreMots with
  484.     |[]-> b
  485.     |h2::t2-> if (containsLetter firstLetterHtmp h2)
  486.                 then appartient firstLetterHtmp t2 true
  487.                 else appartient firstLetterHtmp t2 b
  488. ;;
  489.  
  490. let rec partieCommuneAux l premierMot res = match premierMot with
  491.     ""-> res
  492.     |a-> if (appartient (firstLetter a) (List.tl l) false)
  493.             then partieCommuneAux l ( String.sub a (String.length (firstLetter a)) ((String.length a)-(String.length (firstLetter a))) )(*a-firstLetter a*) res^(firstLetter a)
  494.             else partieCommuneAux l ( String.sub a (String.length (firstLetter a)) ((String.length a)-(String.length (firstLetter a))) ) (*a-firstLetter a*) res
  495. ;;
  496.        
  497.  
  498. let partieCommune l = List.map (fun x -> partieCommuneAux x (List.hd x) "") l ;;
  499.  
  500. let rec listToStringSimplification  l = String.concat "+" (partieCommune l);;
  501.      
  502.      
  503.      
  504.      
  505.      
  506.      
  507.      
  508.      
  509.      
  510.      
  511.  
  512.          let get_all_coord = fun tableau -> List.flatten (List.map (fun x -> vary_line x ((List.length tableau)-1) (List.length tableau)) (vary_col (0,0) ((List.length(List.hd tableau))-1) (List.length(List.hd tableau))))
  513.    
  514.     let parcours = fun tableau list_def->
  515.         List.map (fun x-> explore x tableau list_def) (get_all_coord tableau);;
  516.      
  517.     (* exemples prérentrés *)
  518.         let tableauA = "!ab!c+ab!c+abc+a!bc" ;;
  519.         let tableauB = "!ab!c!d+ab!c!d+a!b!c!d+!ab!cd+ab!cd+a!b!cd+!abcd+abcd+!abc!d+abc!d" ;;
  520.         let tableauC = "!a!b!c!d+!ab!c!d+!ab!cd+!a!bcd+!abcd+a!b!c!d+a!bc!d";;
  521.         let tableauD = "!a!b!c!d+a!b!c!d+!ab!cd+ab!cd+a!b!cd+!abcd+abcd+a!bcd+!a!bc!d+a!bc!d" ;;
  522.         let tableauCorners ="!a!b!c!d+a!b!c!d+!a!bc!d+a!bc!d" ;;
  523.      
  524.     (*procédure à compléter*)
  525.      
  526.     let main2 = fun string ->
  527.         let list_arg = lectureString string in
  528.             let list_word = decompose string in
  529.                 let list_def = split list_arg in
  530.                     let tab_initial = init_tab list_def 0 in
  531.                         let tableau_de_karnaugh = create_table list_word list_def tab_initial in
  532.                             let list_group = parcours tableau_de_karnaugh list_def in
  533.                 let tk = List.map (fun x -> get_word x list_def ) (get_all_coord tableau_de_karnaugh) in       
  534.                                     let list_group_filtered = parcoursFiltrage tk list_group in
  535.                                             listToStringSimplification (list_group_filtered);;
  536.     let main() = print_string (main2 (read_line()));;
  537.  
  538. main(tableauA);;
  539. main(tableauB);;
  540. main(tableauC);;
  541. main(tableauD);;
  542. main(tableauCorners);;
  543.  
  544. print_string ("entrez l'équation de votre choix");;
  545.     main();;
Add Comment
Please, Sign In to add comment