Skip to content
Snippets Groups Projects
  • Erwan Jahier's avatar
    65dfa567
    Documentation et renommage des modules. · 65dfa567
    Erwan Jahier authored
    nb: les tests ne passent toujours bien sur.
    
    * Partie lus -> AST
    
    predef.ml -> srcPredef.ml
    syntaxTreeCore.ml -> astCore.ml
    syntaxTree.ml     -> astV6.ml
    syntaxTreeDump.mli-> astV6Dump.mli
    
    * Partie Ast -> Ast
    
    solveIdent.mli -> astRecognizePredef.mli
    syntaxTab.mli -> astTab.mli
    symbolTab.mli -> astTabSymbol.mli
    
    * Partie  AST -> lic (static evaluation)
    
    eff.ml  -> lic.ml
    getEff.mli -> ast2lic.mli
    lazyCompiler.mli -> licTab.mli
    builtIn.ml -> licMetaOp.ml
    predefEval*.ml -> licEval*.ml
    name.mli -> licName.mli
    
    * Partie Lic -> Lic
    
    uniqueOutput.mli      -> l2lCheckOutputs.mli
    structArrayExpand.mli -> l2lExpandArrays.mli
    nodesExpand.mli       -> l2lExpandNodes.mli
    doNoPoly.ml           -> l2lRmPoly.ml
    doAliasTypes.ml       -> l2lAliasType.ml
    doSplit.ml            -> l2lSplit.ml
    65dfa567
    History
    Documentation et renommage des modules.
    Erwan Jahier authored
    nb: les tests ne passent toujours bien sur.
    
    * Partie lus -> AST
    
    predef.ml -> srcPredef.ml
    syntaxTreeCore.ml -> astCore.ml
    syntaxTree.ml     -> astV6.ml
    syntaxTreeDump.mli-> astV6Dump.mli
    
    * Partie Ast -> Ast
    
    solveIdent.mli -> astRecognizePredef.mli
    syntaxTab.mli -> astTab.mli
    symbolTab.mli -> astTabSymbol.mli
    
    * Partie  AST -> lic (static evaluation)
    
    eff.ml  -> lic.ml
    getEff.mli -> ast2lic.mli
    lazyCompiler.mli -> licTab.mli
    builtIn.ml -> licMetaOp.ml
    predefEval*.ml -> licEval*.ml
    name.mli -> licName.mli
    
    * Partie Lic -> Lic
    
    uniqueOutput.mli      -> l2lCheckOutputs.mli
    structArrayExpand.mli -> l2lExpandArrays.mli
    nodesExpand.mli       -> l2lExpandNodes.mli
    doNoPoly.ml           -> l2lRmPoly.ml
    doAliasTypes.ml       -> l2lAliasType.ml
    doSplit.ml            -> l2lSplit.ml
astInstanciateModel.mli 1.63 KiB
(* Time-stamp: <modified the 13/12/2012 (at 11:34) by Erwan Jahier> *)

(** Create packages from Model instances.  *)

(** Une seule fonctionnalité : transformer au niveau "quasi-syntaxique" des
instances de pack du style "package toto = titi(....)" en package "donné",
SI BESOIN.

(i.e. pack_info -> pack_given)

----------------------------------------------------------------------*)

(**----------------------------------------------------------------------
DESCRIPTION :

Entrée, deux tables d'infos syntaxique :
- une table ptab : (string, AstV6.pack_info srcflagged) Hashtbl.t 
- une table mtab : (string, AstV6.model_info srcflagged) Hashtbl.t 

Sortie, une table d'info de package expansées :
- une table xptab : (string, t) Hashtbl.t

Fonctionnement :
On met en relation les couples (param formel, arg effectif) :

(type t, id/type_exp) : on crée l'alias "type t = id/type_exp",
  qu'on met à la fois dans les export et dans le body
  => LES DÉCLARATIONS DE TYPES SONT EXPORTÉES

(const c : t, id/val_exp) : on crée l'alias "const c : t = id/val_exp",
  qu'on met à la fois dans les export et dans le body
  => LES DÉCLARATIONS DE CONST SONT EXPORTÉES

(node n(..)returns(...), id/node_exp) :
  - on garde le noeud "abstrait" dans export => node n(..)returns(...)
  - on définit l'alias "node n(..)returns(...) = id/node_exp" dans body


----------------------------------------------------------------------*)



(* ZZZ remplit AstTab.t par effet de bords. *)
val f : 
  (* la table des sources de modeles *)
  (Ident.t, AstV6.model_info Lxm.srcflagged) Hashtbl.t ->
  (* la def de pack à traiter *)
  (AstV6.pack_info  Lxm.srcflagged) ->
  AstV6.pack_given