Revision cec6716c7d7cdf9fb83c977186b15816c9276b05 authored by Pierre-Yves Strub on 11 June 2022, 06:10:21 UTC, committed by Pierre-Yves Strub on 11 June 2022, 06:10:21 UTC
Loops' epilogs must now be deterministic and loop/calls-free.

This forbids the following unsoundness:

```
require import AllCore DBool.

module E = {
  var i,j : int
  proc foo () = {
    var c;
    i <- 0;
    j <- 0;
    c <- false;
    while (!c) {
      i <- i + 1;
      j <- j + 1;
      c <$ {0,1};
    }
    return i = j;
  }

  proc bar () = {
    var c;
    i <- 0;
    j <- 0;
    c <- false;
    while (!c) {
      i <- i + 1;
      c <$ {0,1};
    }
    c <- false;
    while (!c) {
      j <- j + 1;
      c <$ {0,1};
    }
    return i = j;
  }
}.

equiv bad : E.foo ~ E.bar : true ==> ={res}.
proof.
proc.
fission{1} 4!1 @1,2. by sim.
qed.
```

Fix #210
1 parent 1f8da33
Raw File
Makefile
# -*- Makefile -*-

# --------------------------------------------------------------------
DUNE      ?= dune
ECARGS    ?=
ECTOUT    ?= 10
ECJOBS    ?= 0
ECEXTRA   ?= --report=report.log
ECPROVERS ?= Alt-Ergo Z3 CVC4
CHECKPY   ?=
CHECK     := $(CHECKPY) scripts/testing/runtest
CHECK     += --bin-args="$(ECARGS)" --bin-args="$(ECPROVERS:%=-p %)"
CHECK     += --timeout="$(ECTOUT)" --jobs="$(ECJOBS)"
CHECK     += $(ECEXTRA) config/tests.config

# --------------------------------------------------------------------
UNAME_P = $(shell uname -p)
UNAME_S = $(shell uname -s)

# --------------------------------------------------------------------
.PHONY: default build byte native tests check examples
.PHONY: clean install uninstall

default: build
	@true

build:
	rm -f src/ec.exe ec.native
	$(DUNE) build
	ln -sf src/ec.exe ec.native
ifeq ($(UNAME_P)-$(UNAME_S),arm-Darwin)
	-codesign -s - src/ec.exe
endif

install: build
	$(DUNE) install

uninstall:
	$(DUNE) uninstall

check: stdlib examples

stdlib: build
	$(CHECK) prelude stdlib

examples: build
	$(CHECK) examples mee-cbc

check: stdlib examples
	@true

clean:
	rm -f ec.native && $(DUNE) clean
	find theories examples -name '*.eco' -exec rm '{}' ';'

clean_eco:
	find theories examples -name '*.eco' -exec rm '{}' ';'
back to top