Commit e3cc32aa authored by Andrei Paskevich's avatar Andrei Paskevich
Browse files

Parser: emit a warning on redundant "import"

parent eae547d9
module M
use import int.Int
use int.Int
type int_type = Integer int
......
......@@ -2,8 +2,8 @@
module Array_records
use import int.Int
use import array.Array
use int.Int
use array.Array
type value = int
type index = int
......
module A
use import int.Int
use import array.Array
use int.Int
use array.Array
let f1 (a:array int) : int
= a[0]
......@@ -16,9 +16,9 @@ end
module B
use import int.Int
use import array.Array
clone import array.Sorted with
use int.Int
use array.Array
clone array.Sorted with
type elt=int,
predicate le=(<=)
......
theory T32
use import ieee_float.Float32
use ieee_float.Float32
goal g1 : forall x:t. eq x (0.0:t)
......@@ -26,7 +26,7 @@ end
theory T64
use import ieee_float.Float64
use ieee_float.Float64
goal g1 : forall x:t. eq x (0.0:t)
......
module Main
use import int.Int
use int.Int
type path_sel_type = { mutable sel_path : bool}
......@@ -12,8 +12,8 @@ end
module Other
use import int.Int
use import Main
use int.Int
use Main
let f (a : int)
ensures {result = 5}
......
theory T
use import int.Int
use int.Int
goal g_lab : forall x [@model] :int. x >= 42 -> x + 3 <= 50
......
module Ce_int32
use import ref.Ref
use ref.Ref
use export mach.int.Int32
let dummy_update (r: ref int32)
......
theory ModelInt
use import int.Int
use int.Int
(* PASS *)
goal test0 : forall x:int. not (0 < x < 1)
......@@ -8,7 +8,7 @@ goal test0 : forall x:int. not (0 < x < 1)
(* CE *)
goal test1 : forall x:int. not (0 <= x <= 1)
use import int.EuclideanDivision
use int.EuclideanDivision
(* CE *)
goal test2 : forall x:int. div x x = 1
......
module M
use import int.Int
use import ref.Ref
use int.Int
use ref.Ref
val a : ref int
......
module Array
use import int.Int
use import array.Array
use int.Int
use array.Array
type t
......
module Abstract
use import int.Int
use int.Int
type byte
function to_int byte : int
......@@ -18,7 +18,7 @@ val add (x y : byte) : byte
requires { [@expl:integer overflow] in_range (to_int x + to_int y) }
ensures { to_int result = to_int x + to_int y }
use import ref.Ref
use ref.Ref
let p3 (a : ref byte) =
a := add !a (of_int 1)
......@@ -27,8 +27,8 @@ end
module Record
use import int.Int
use import Abstract
use int.Int
use Abstract
type r = {mutable f : byte; mutable g : bool}
......
module List_int
use import int.Int
use int.Int
type list = Nil | Cons int list
......@@ -19,8 +19,8 @@ end
module List_poly
use import list.List
use import list.Length
use list.List
use list.Length
goal g1: forall l:list int. length l <> 0
......
theory ModelMap
use import map.Map
use map.Map
goal t1 : forall t:map int int, i : int.
get (set t 0 42) i = get t i
......@@ -9,9 +9,9 @@ end
module M
use import int.Int
use import ref.Ref
use import map.Map
use int.Int
use ref.Ref
use map.Map
let ghost test_map (ghost x : ref (map int int)) : unit
ensures { !x[0] <> !x[1] }
......
theory ModelReal
use import real.Real
use real.Real
goal test1 : forall x:real. not (0.0 < x < 1.0)
......
module M
use import map.Map
use import int.Int
use map.Map
use int.Int
type r = {f [@model_trace:.field_f] :int; g:bool}
......
......@@ -4,8 +4,8 @@
module M
use import ref.Ref
use import int.Int
use ref.Ref
use int.Int
(*** In all cases, records are decomposed using match eval ***)
......@@ -49,7 +49,7 @@ end
module Mutable
use import int.Int
use int.Int
type r = {mutable f [@model_trace:.my_field_f] :int; mutable g:bool}
......
module M
use import ref.Ref
use import list.List
use import int.Int
use ref.Ref
use list.List
use int.Int
let test_post (x: int) (y: ref int): unit
ensures { old !y >= x }
......
module M
use import int.Int
use import ref.Ref
use int.Int
use ref.Ref
val a : ref int
......
theory ModelArray
use import map.Map
use map.Map
goal t1 : forall t: map int int, i: int.
get (set t 0 42) i = get t i
......
module Arith
use import int.Int
use int.Int
goal G1: 0 = 1
use import int.ComputerDivision
use int.ComputerDivision
goal G2: div 1 0 = div 2 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment