20 Commits

Author SHA1 Message Date
BONNOT Paul
58313caa48 Resolve "Give values to BV constants when cloning" 2023-06-16 08:44:32 +00:00
Claude Marche
621aff44a7 Several renamings and fix a few pre and post-conditions 2021-09-29 08:57:02 +02:00
Claude Marche
694753fbc1 Update bitvector modules for use in programs.
Makes both signed and unsigned operations, which have
slightly different pre-conditions.

Further improvement needed: overflow checks are still
using functions `to_int` or `to_uint`, which are not
suitable for SMT solvers with bit-vector support.
2021-02-09 18:41:18 +01:00
Claude Marche
47500c797b update sessions 2018-10-16 16:57:08 +02:00
Andrei Paskevich
5130cf4361 update CHANGES + some cosmetics 2018-06-24 14:39:47 +02:00
Andrei Paskevich
eae547d95f stdlib, examples: remove redundant "import" 2018-06-15 16:45:58 +02:00
Guillaume Melquiond
1b197bd783 Convert some more examples. 2018-06-13 18:27:13 +02:00
Jean-Christophe Filliatre
6af5c23793 simpler variants in bitvector examples 2018-05-31 19:28:36 +02:00
Andrei Paskevich
3cdb964702 WhyML: overload literals for range and float types 2017-12-06 17:56:20 +01:00
Claude Marche
b7787a0143 fix examples using bitvectors 2017-04-28 14:09:39 +02:00
Guillaume Melquiond
4822694f3b Merge branch 'master' into new_system 2017-04-14 17:45:25 +02:00
Clément Fumex
f05478680f Add the ability to
* declare range types and float types,
* use integer (resp. real) literals for those types through casting,
* specify how to print them in drivers.

Change in syntax
* use

  type t = < range 1 2 >   (* integers from 1 to 2 *)
  type t' = < float 4 12 > (* float with 4 bits in exponent and 12 in mantissa *)

  the two projections :
  t'int
  t''real

  and the predicate :
  t''isFinite

* Restrict the use of "'" in whyml:
  Users are not allowed to introduce names where a quote symbol
  is followed by a letter. Thus, the following identifiers are
  valid:

  t'
  toto'0''
  toto'_phi

  whereas toto'phi is not.

Note: we do not yet support negative numbers in range declaration
and casting of a literal.
2017-02-28 16:31:36 +01:00
Andrei Paskevich
91b9f5bc27 Parser: drop syntax "abstract <spec> <expr_seq> end"
use "begin <spec> <expr_seq> end" instead. The word "abstract" is
now only used to declare a private type whose fields are all ghost.
2016-04-01 16:02:46 +02:00
Claude Marche
71f138c5e5 Bitvector: equality in programs 2016-03-09 16:33:58 +01:00
Claude Marche
a1e22351ee Update examples in progress 2016-03-09 15:22:02 +01:00
Clément Fumex
3a2d2ca99c change zero to zeros in bv theory 2016-01-28 17:30:17 +01:00
Claude Marche
4920bbf38f example bitwalker: a version of 'peek' closer to SPARK-generated version 2015-10-22 15:30:22 +02:00
Clément Fumex
8761602f5d - some modifications to bv.why/mlw :
+ size -> size_bv
  + size_int -> size
  + change two_power_size and max_int definitions
  + add axioms to BVConverter
  + new axiom relating nth and nth_bv
  + some reorganisation
- update coq realisation
- modify in consequence the relevant examples and pull the completed ones out of in_progress
2015-10-07 14:10:44 +02:00
Claude Marché
fcfb8db4bc indentation 2015-08-20 17:45:09 +02:00
Clément Fumex
311905a83f Finish and move bitwalker example into main example folder.
Change queens_bv to use new predicate eq_sub.
2015-07-10 16:11:46 +02:00