- riattaccare hbugs (brrr...) -> Zack
GUI LOGICA
+ - fattorizzare codice fra MatitaEngine e DisambiguatePp (dove, fra l'altro,
+ ora io (=CSC) ho messo anche un parser!!!)
- verificare se tutte le query sono ora ottimizzate (usando il comando
explain) e usano gli indici in maniera ottimale; inoltre migliorare gli
indici sulle tabelle hits and count
eval_coercion status coercion
| GrafiteAst.Alias (loc, spec) ->
let aliases =
+ (*CSC: Warning: this code should be factorized with the corresponding
+ code in DisambiguatePp *)
match spec with
| GrafiteAst.Ident_alias (id,uri) ->
DisambiguateTypes.Environment.add
open DisambiguateTypes
+let parse_environment str =
+ let stream = Stream.of_string str in
+ let environment = ref Environment.empty in
+ try
+ while true do
+ let alias =
+ match GrafiteParser.parse_statement stream with
+ GrafiteAst.Executable (_, GrafiteAst.Command (_, GrafiteAst.Alias (_,alias)))
+ -> alias
+ | _ -> assert false in
+ let key,value =
+ (*CSC: Warning: this code should be factorized with the corresponding
+ code in MatitaEngine *)
+ match alias with
+ GrafiteAst.Ident_alias (id,uri) ->
+ Id id,
+ (uri,(fun _ _ _-> CicUtil.term_of_uri (UriManager.uri_of_string uri)))
+ | GrafiteAst.Symbol_alias (symb,instance,desc) ->
+ Symbol (symb,instance),
+ DisambiguateChoices.lookup_symbol_by_dsc symb desc
+ | GrafiteAst.Number_alias (instance,desc) ->
+ Num instance,
+ DisambiguateChoices.lookup_num_by_dsc desc
+ in
+ environment := Environment.add key value !environment;
+ done;
+ assert false
+ with End_of_file ->
+ !environment
+
let pp_environment env =
let aliases =
Environment.fold