Correction of DCS tests

- contrenum.ept includes contracts and controllable variable: moved to sdc test directory
- lnum_simple.ept: added "enforce true" contract (at least one objective in the syntax)
- script compile_sdc_run: heptc options to point to local Heptagon library
master
Gwenaël Delaval 7 years ago
parent e4f51fea68
commit 15238eaf8b

@ -50,7 +50,6 @@ ADD_TEST(compile_only_clock_causality "scripts/compile_only" "good/clock_causali
ADD_TEST(compile_only_clocks "scripts/compile_only" "good/clocks.ept")
ADD_TEST(compile_only_contract_automaton "scripts/compile_only" "good/contract_automaton.ept")
ADD_TEST(compile_only_contract "scripts/compile_only" "good/contract.ept")
ADD_TEST(compile_only_contrenum "scripts/compile_only" "good/contrenum.ept")
ADD_TEST(compile_only_convolutions "scripts/compile_only" "good/convolutions.ept")
ADD_TEST(compile_only_counter "scripts/compile_only" "good/counter.ept")
ADD_TEST(compile_only_current "scripts/compile_only" "good/current.ept")
@ -135,7 +134,6 @@ ADD_TEST(compile_gcc_run_clock_causality "scripts/compile_gcc_run" "good/clock_c
ADD_TEST(compile_gcc_run_clocks "scripts/compile_gcc_run" "good/clocks.ept")
ADD_TEST(compile_gcc_run_contract_automaton "scripts/compile_gcc_run" "good/contract_automaton.ept")
ADD_TEST(compile_gcc_run_contract "scripts/compile_gcc_run" "good/contract.ept")
ADD_TEST(compile_gcc_run_contrenum "scripts/compile_gcc_run" "good/contrenum.ept")
ADD_TEST(compile_gcc_run_convolutions "scripts/compile_gcc_run" "good/convolutions.ept")
ADD_TEST(compile_gcc_run_counter "scripts/compile_gcc_run" "good/counter.ept")
ADD_TEST(compile_gcc_run_current "scripts/compile_gcc_run" "good/current.ept")
@ -220,7 +218,6 @@ ADD_TEST(test_option_bool_clock_causality "scripts/test_option" "good/clock_caus
ADD_TEST(test_option_bool_clocks "scripts/test_option" "good/clocks.ept" "-bool")
ADD_TEST(test_option_bool_contract_automaton "scripts/test_option" "good/contract_automaton.ept" "-bool")
ADD_TEST(test_option_bool_contract "scripts/test_option" "good/contract.ept" "-bool")
ADD_TEST(test_option_bool_contrenum "scripts/test_option" "good/contrenum.ept" "-bool")
ADD_TEST(test_option_bool_convolutions "scripts/test_option" "good/convolutions.ept" "-bool")
ADD_TEST(test_option_bool_counter "scripts/test_option" "good/counter.ept" "-bool")
ADD_TEST(test_option_bool_current "scripts/test_option" "good/current.ept" "-bool")
@ -305,7 +302,6 @@ ADD_TEST(test_option_deadcode_clock_causality "scripts/test_option" "good/clock_
ADD_TEST(test_option_deadcode_clocks "scripts/test_option" "good/clocks.ept" "-deadcode")
ADD_TEST(test_option_deadcode_contract_automaton "scripts/test_option" "good/contract_automaton.ept" "-deadcode")
ADD_TEST(test_option_deadcode_contract "scripts/test_option" "good/contract.ept" "-deadcode")
ADD_TEST(test_option_deadcode_contrenum "scripts/test_option" "good/contrenum.ept" "-deadcode")
ADD_TEST(test_option_deadcode_convolutions "scripts/test_option" "good/convolutions.ept" "-deadcode")
ADD_TEST(test_option_deadcode_counter "scripts/test_option" "good/counter.ept" "-deadcode")
ADD_TEST(test_option_deadcode_current "scripts/test_option" "good/current.ept" "-deadcode")
@ -390,7 +386,6 @@ ADD_TEST(test_option_tomato_clock_causality "scripts/test_option" "good/clock_ca
ADD_TEST(test_option_tomato_clocks "scripts/test_option" "good/clocks.ept" "-tomato")
ADD_TEST(test_option_tomato_contract_automaton "scripts/test_option" "good/contract_automaton.ept" "-tomato")
ADD_TEST(test_option_tomato_contract "scripts/test_option" "good/contract.ept" "-tomato")
ADD_TEST(test_option_tomato_contrenum "scripts/test_option" "good/contrenum.ept" "-tomato")
ADD_TEST(test_option_tomato_convolutions "scripts/test_option" "good/convolutions.ept" "-tomato")
ADD_TEST(test_option_tomato_counter "scripts/test_option" "good/counter.ept" "-tomato")
ADD_TEST(test_option_tomato_current "scripts/test_option" "good/current.ept" "-tomato")
@ -475,7 +470,6 @@ ADD_TEST(test_option_flatten_clock_causality "scripts/test_option" "good/clock_c
ADD_TEST(test_option_flatten_clocks "scripts/test_option" "good/clocks.ept" "-flatten")
ADD_TEST(test_option_flatten_contract_automaton "scripts/test_option" "good/contract_automaton.ept" "-flatten")
ADD_TEST(test_option_flatten_contract "scripts/test_option" "good/contract.ept" "-flatten")
ADD_TEST(test_option_flatten_contrenum "scripts/test_option" "good/contrenum.ept" "-flatten")
ADD_TEST(test_option_flatten_convolutions "scripts/test_option" "good/convolutions.ept" "-flatten")
ADD_TEST(test_option_flatten_counter "scripts/test_option" "good/counter.ept" "-flatten")
ADD_TEST(test_option_flatten_current "scripts/test_option" "good/current.ept" "-flatten")
@ -560,7 +554,6 @@ ADD_TEST(test_option_itfusion_clock_causality "scripts/test_option" "good/clock_
ADD_TEST(test_option_itfusion_clocks "scripts/test_option" "good/clocks.ept" "-itfusion")
ADD_TEST(test_option_itfusion_contract_automaton "scripts/test_option" "good/contract_automaton.ept" "-itfusion")
ADD_TEST(test_option_itfusion_contract "scripts/test_option" "good/contract.ept" "-itfusion")
ADD_TEST(test_option_itfusion_contrenum "scripts/test_option" "good/contrenum.ept" "-itfusion")
ADD_TEST(test_option_itfusion_convolutions "scripts/test_option" "good/convolutions.ept" "-itfusion")
ADD_TEST(test_option_itfusion_counter "scripts/test_option" "good/counter.ept" "-itfusion")
ADD_TEST(test_option_itfusion_current "scripts/test_option" "good/current.ept" "-itfusion")
@ -645,7 +638,6 @@ ADD_TEST(test_option_memalloc_clock_causality "scripts/test_option" "good/clock_
ADD_TEST(test_option_memalloc_clocks "scripts/test_option" "good/clocks.ept" "-memalloc")
ADD_TEST(test_option_memalloc_contract_automaton "scripts/test_option" "good/contract_automaton.ept" "-memalloc")
ADD_TEST(test_option_memalloc_contract "scripts/test_option" "good/contract.ept" "-memalloc")
ADD_TEST(test_option_memalloc_contrenum "scripts/test_option" "good/contrenum.ept" "-memalloc")
ADD_TEST(test_option_memalloc_convolutions "scripts/test_option" "good/convolutions.ept" "-memalloc")
ADD_TEST(test_option_memalloc_counter "scripts/test_option" "good/counter.ept" "-memalloc")
ADD_TEST(test_option_memalloc_current "scripts/test_option" "good/current.ept" "-memalloc")
@ -730,7 +722,6 @@ ADD_TEST(test_option_unroll_clock_causality "scripts/test_option" "good/clock_ca
ADD_TEST(test_option_unroll_clocks "scripts/test_option" "good/clocks.ept" "-unroll")
ADD_TEST(test_option_unroll_contract_automaton "scripts/test_option" "good/contract_automaton.ept" "-unroll")
ADD_TEST(test_option_unroll_contract "scripts/test_option" "good/contract.ept" "-unroll")
ADD_TEST(test_option_unroll_contrenum "scripts/test_option" "good/contrenum.ept" "-unroll")
ADD_TEST(test_option_unroll_convolutions "scripts/test_option" "good/convolutions.ept" "-unroll")
ADD_TEST(test_option_unroll_counter "scripts/test_option" "good/counter.ept" "-unroll")
ADD_TEST(test_option_unroll_current "scripts/test_option" "good/current.ept" "-unroll")
@ -815,7 +806,6 @@ ADD_TEST(test_option_O_clock_causality "scripts/test_option" "good/clock_causali
ADD_TEST(test_option_O_clocks "scripts/test_option" "good/clocks.ept" "-O")
ADD_TEST(test_option_O_contract_automaton "scripts/test_option" "good/contract_automaton.ept" "-O")
ADD_TEST(test_option_O_contract "scripts/test_option" "good/contract.ept" "-O")
ADD_TEST(test_option_O_contrenum "scripts/test_option" "good/contrenum.ept" "-O")
ADD_TEST(test_option_O_convolutions "scripts/test_option" "good/convolutions.ept" "-O")
ADD_TEST(test_option_O_counter "scripts/test_option" "good/counter.ept" "-O")
ADD_TEST(test_option_O_current "scripts/test_option" "good/current.ept" "-O")
@ -900,7 +890,6 @@ ADD_TEST(compile_javac_run_clock_causality "scripts/compile_javac_run" "good/clo
ADD_TEST(compile_javac_run_clocks "scripts/compile_javac_run" "good/clocks.ept")
ADD_TEST(compile_javac_run_contract_automaton "scripts/compile_javac_run" "good/contract_automaton.ept")
ADD_TEST(compile_javac_run_contract "scripts/compile_javac_run" "good/contract.ept")
ADD_TEST(compile_javac_run_contrenum "scripts/compile_javac_run" "good/contrenum.ept")
ADD_TEST(compile_javac_run_convolutions "scripts/compile_javac_run" "good/convolutions.ept")
ADD_TEST(compile_javac_run_counter "scripts/compile_javac_run" "good/counter.ept")
ADD_TEST(compile_javac_run_current "scripts/compile_javac_run" "good/current.ept")
@ -966,6 +955,7 @@ ADD_TEST(compile_javac_run_type_alias "scripts/compile_javac_run" "good/type_ali
ADD_TEST(compile_javac_run_updown "scripts/compile_javac_run" "good/updown.ept")
ADD_TEST(compile_javac_run_when_merge1 "scripts/compile_javac_run" "good/when_merge1.ept")
ADD_TEST(compile_sdc_run_alloc "scripts/compile_sdc_run" "sdc/alloc.ept")
ADD_TEST(compile_sdc_run_contrenum "scripts/compile_sdc_run" "sdc/contrenum.ept")
ADD_TEST(compile_sdc_run_lnum_simple "scripts/compile_sdc_run" "sdc/lnum_simple.ept")
ADD_TEST(compile_sdc_run_modular "scripts/compile_sdc_run" "sdc/modular.ept")
ADD_TEST(compile_sdc_run_office "scripts/compile_sdc_run" "sdc/office.ept")

@ -5,7 +5,7 @@ source scripts/config
progpath=$1
shift
bzreaxoption="$*"
hept_comp_opts="--heptc ../${COMPILER_DIR}/${COMPILER} --ctrl2ept ${CTRL2EPT}"
hept_comp_opts="--heptc ../${COMPILER_DIR}/${COMPILER} --heptc-opts -stdlib --heptc-opts ../../lib --ctrl2ept ${CTRL2EPT}"
# run the program: no by default
run=0

@ -35,7 +35,7 @@ let
tel
node main() = (ok:bool;active,ended:int)
contract assume (active >= 0) & (ended <= (0 fby active)) & (ended >= 0)
contract assume (active >= 0) & (ended <= (0 fby active)) & (ended >= 0) enforce true
var x,y,nb_req,waiting:int;
let
y = f(x);

Loading…
Cancel
Save