@@ -495,7 +495,7 @@ let rec dty_to_ty ?(update = false) ?(is_var = false) dty =
495495    let  vty =  aux vty in 
496496    Ty. Tfarray  (ity, vty)
497497  |  `Bitv  n  ->
498-     if  n < =  0  then  Errors. typing_error (NonPositiveBitvType  n) DStd. Loc. dummy;
498+     if  n < =  0  then  Errors. typing_error (NonPositiveBitvType  n) Loc. dummy;
499499    Ty. Tbitv  n
500500
501501  |  `App  (`Builtin B. Unit, [] ) -> Ty. tunit
@@ -763,7 +763,7 @@ let arith_ty = function
763763   - [lb] is the (optional) lower bound for the variable [var] 
764764   - [ub] is the (optional) upper bound for the variable [var] 
765765*) 
766- let  parse_semantic_bound  ?(loc  = DStd. Loc. dummy)  ~var   b  x  y  = 
766+ let  parse_semantic_bound  ?(loc  = Loc. dummy)  ~var   b  x  y  = 
767767  let  is_main_var  { DE. term_descr; _ }  = 
768768    match  term_descr with 
769769    |  DE. Var  v  -> DE.Id. equal v var
@@ -779,7 +779,7 @@ let parse_semantic_bound ?(loc = DStd.Loc.dummy) ~var b x y =
779779    |  _  ->
780780      Fmt. failwith
781781        " %aInternal error: invalid semantic bound" 
782-         DStd. Loc.fmt  loc
782+         Loc. report  loc
783783  in 
784784  let  sort =  arith_ty t in 
785785  let  parse_bound_kind  { DE. term_descr; _ }  = 
@@ -790,7 +790,7 @@ let parse_semantic_bound ?(loc = DStd.Loc.dummy) ~var b x y =
790790    |  _  ->
791791      Fmt. failwith
792792        " %aInternal error: invalid semantic bound" 
793-         DStd. Loc.fmt  loc
793+         Loc. report  loc
794794  in 
795795  (*  Parse [main_var `op` b] *) 
796796  let  parse_bound  ?(flip  = false )  b  = 
@@ -869,7 +869,7 @@ let mk_rounding fpar =
869869    Builds an Alt-Ergo hashconsed expression from a dolmen term 
870870*) 
871871let  rec  mk_expr 
872-     ?(loc  = DStd. Loc. dummy)  ?(name_base  = " "  )  ?(toplevel  = false ) 
872+     ?(loc  = Loc. dummy)  ?(name_base  = " "  )  ?(toplevel  = false ) 
873873    ~decl_kind   dt  = 
874874  let  name_tag =  ref  0  in 
875875  let  rec  aux_mk_expr  ?(toplevel  = false ) 
@@ -984,7 +984,7 @@ let rec mk_expr
984984              |  _  ->
985985                Fmt. failwith
986986                  " %asemantic trigger should have at most one bound variable" 
987-                   DStd. Loc.fmt  loc
987+                   Loc. report  loc
988988            in 
989989            semantic_trigger ~loc  ?var trigger
990990
@@ -1400,7 +1400,7 @@ let rec mk_expr
14001400      res
14011401    |  _  -> res
14021402
1403-   and  semantic_trigger  ?var   ?(loc  = DStd. Loc. dummy)  t  = 
1403+   and  semantic_trigger  ?var   ?(loc  = Loc. dummy)  t  = 
14041404    let  cst, args = 
14051405      match  destruct_app t with 
14061406      |  Some  (cst , args ) -> cst, args
@@ -1424,7 +1424,7 @@ let rec mk_expr
14241424        |  _  ->
14251425          Fmt. failwith
14261426            " %aMaps_to: expected a variable but got: %a" 
1427-             DStd. Loc.fmt  loc DE.Term. print x
1427+             Loc. report  loc DE.Term. print x
14281428      end 
14291429
14301430    (*  open-ended in interval *) 
@@ -1467,16 +1467,16 @@ let rec mk_expr
14671467          E. mk_term (Sy. mk_in lb ub) [aux_mk_expr main_expr] Ty. Tbool 
14681468        |  _  ->
14691469          Fmt. failwith " %aInvalid semantic trigger: %a" 
1470-             DStd. Loc.fmt  loc DE.Term. print t
1470+             Loc. report  loc DE.Term. print t
14711471      end 
14721472
14731473    |  _  ->
14741474      Fmt. failwith " %aInvalid semantic trigger: %a" 
1475-         DStd. Loc.fmt  loc DE.Term. print t
1475+         Loc. report  loc DE.Term. print t
14761476
14771477  in  aux_mk_expr ~toplevel  dt
14781478
1479- and  make_trigger  ?(loc  = DStd. Loc. dummy)  ~name_base   ~decl_kind  
1479+ and  make_trigger  ?(loc  = Loc. dummy)  ~name_base   ~decl_kind  
14801480    ~(in_theory : bool ) (name : string ) (hyp : E.t list )
14811481    (e , from_user : DE.term * bool ) = 
14821482  (*  Dolmen adds an existential quantifier to bind the '?xxx' variables *) 
@@ -1618,11 +1618,12 @@ let rec is_pure_term t =
16181618
16191619let  make  file  acc  stmt  = 
16201620  let  rec  aux  acc  (stmt : _ Typer_Pipe.stmt ) = 
1621-     let  st_loc =  Dolmen.Std.Loc. loc file stmt.loc in 
1621+     let  loc =  Dolmen.Std.Loc. loc file stmt.loc in 
1622+     let  st_loc =  Loc. from_dolmen_loc loc in 
16221623    match  stmt with 
16231624    (*  Optimize terms *) 
16241625    |  { contents  = `Optimize  (t , is_max ); _ }  ->
1625-       let  e =  mk_expr ~loc: st_loc ~toplevel: true  ~decl_kind: Dobjective  t  in 
1626+       let  e =  mk_expr t  ~loc: st_loc ~toplevel: true  ~decl_kind: Dobjective  in 
16261627      let  fn =  Objective.Function. mk ~is_max  e in 
16271628      if  not  @@  is_pure_term e then 
16281629        begin 
@@ -1760,7 +1761,7 @@ let make file acc stmt =
17601761        |  _  ->
17611762          Fmt. failwith
17621763            " %a: Internal error: multiple theories." 
1763-             DStd.Loc. fmt st_loc 
1764+             DStd.Loc. fmt loc 
17641765      in 
17651766      let  decl_kind, assume = 
17661767        match  theory with 
@@ -1837,7 +1838,7 @@ let make file acc stmt =
18371838                in 
18381839                let  qb =  E. mk_eq ~iff: true  defn ff in 
18391840                let  ff = 
1840-                   E. mk_forall name_base DStd. Loc. dummy binders []  qb
1841+                   E. mk_forall name_base Loc. dummy binders []  qb
18411842                    ~toplevel: true  ~decl_kind 
18421843                in 
18431844                assert  (Var.Map. is_empty (E. free_vars ff Var.Map. empty));
@@ -1858,7 +1859,7 @@ let make file acc stmt =
18581859                let  iff =  Ty. equal (Expr. type_info defn) (Ty. Tbool ) in 
18591860                let  qb =  E. mk_eq ~iff  defn ff in 
18601861                let  ff = 
1861-                   E. mk_forall name_base DStd. Loc. dummy binders []  qb
1862+                   E. mk_forall name_base Loc. dummy binders []  qb
18621863                    ~toplevel: true  ~decl_kind 
18631864                in 
18641865                assert  (Var.Map. is_empty (E. free_vars ff Var.Map. empty));
0 commit comments