Commit 2eea2380 by MARCHE Claude

### jessie3: complete support for axiomatics

parent eb04cd23
 ... ... @@ -7,25 +7,26 @@ //@ lemma l1: \forall integer x; f1(x) >= 1; /*@ axiomatic Bag { @ type bag; @ // logic integer occ( x, bag b); @ // axiom extensionality: \forall bag b1,b2; @ // (\forall x, occ(x,b1) == occ(x,b2)) ==> b1 == b2; @ // logic bag singleton( x); @ // axiom occ_singleton_eq: \forall x; @ // occ(x,singleton(x)) == 1; @ // axiom occ_singleton_neq: \forall x,y; @ // x != y ==> occ(x,singleton(y)) == 0; @ // logic bag bag_union(bag b1,bag b2); @ // axiom occ_union: \forall x, bag b1,b2; @ // occ(x,union(b1,b2)) == occ(x,b1) + occ(x,b2); /*@ axiomatic BagInt { @ type bag; @ logic integer occ(integer x, bag b); @ axiom extensionality: \forall bag b1,b2; @ (\forall integer x; occ(x,b1) == occ(x,b2)) ==> b1 == b2; @ logic bag singleton(integer x); @ axiom occ_singleton_eq: \forall integer x; @ occ(x,singleton(x)) == 1; @ axiom occ_singleton_neq: \forall integer x,y; @ x != y ==> occ(x,singleton(y)) == 0; @ logic bag bag_union(bag b1,bag b2); @ axiom occ_union: \forall integer x, bag b1,b2; @ occ(x,bag_union(b1,b2)) == occ(x,b1) + occ(x,b2); @ lemma l2: f1(1) == 2; @ } @*/ // lemma union_comm: \forall bag b1,b2; // bag_union(b1,b2) == bag_union(b2,b1); /*@ lemma union_comm: \forall bag b1,b2; @ bag_union(b1,b2) == bag_union(b2,b1); @*/ ... ...
 /*@ axiomatic Bag { @ type bag; @ // logic integer occ( x, bag b); @ // axiom extensionality: \forall bag b1,b2; @ // (\forall x, occ(x,b1) == occ(x,b2)) ==> b1 == b2; @ // logic bag singleton( x); @ // axiom occ_singleton_eq: \forall x; @ // occ(x,singleton(x)) == 1; @ // axiom occ_singleton_neq: \forall x,y; @ // x != y ==> occ(x,singleton(y)) == 0; @ // logic bag bag_union(bag b1,bag b2); @ // axiom occ_union: \forall x, bag b1,b2; @ // occ(x,union(b1,b2)) == occ(x,b1) + occ(x,b2); @ lemma l2: f1(1) == 2; @ } @*/
 [kernel] preprocessing with "gcc -C -E -I. tests/basic/axiomatic.c" [jessie3] user error: WARNING: Variable Frama_C_copy_block not translated [jessie3] user error: WARNING: Variable Frama_C_bzero not translated [jessie3] user error: WARNING: Variable Frama_C_copy_block not translated [jessie3] creating logic symbol 739 (f1) [jessie3] creating logic symbol 743 (occ) [jessie3] creating logic symbol 748 (singleton) [jessie3] creating logic symbol 754 (bag_union) [jessie3] found 1 decls [jessie3] made 3 theories [jessie3] running theory 1: [jessie3] theory Decls [jessie3] theory Top (* use BuiltIn *) (* use int.Int *) (* use real.Real *) lemma l1 : (6 * 7) = 42 function f1 (x:int) : int = (x * x) + 1 lemma l1 : forall x:int. f1 x >= 1 end [jessie3] Dealing with task 1 [jessie3] Status with CVC3 2.4.1: Valid ... ... @@ -20,28 +26,58 @@ [jessie3] Status with Z3 3.2: Valid [jessie3] Status with Alt-Ergo 0.94: Valid [jessie3] running theory 1: [jessie3] theory Bag [jessie3] theory BagInt (* use BuiltIn *) (* use int.Int *) (* use real.Real *) type bag 'x (* use Top *) type bag function occ int bag : int axiom extensionality : forall b1:bag, b2:bag. (forall x:int. occ x b1 = occ x b2) -> b1 = b2 function singleton int : bag axiom occ_singleton_eq : forall x:int. occ x (singleton x) = 1 axiom occ_singleton_neq : forall x:int, y:int. not x = y -> occ x (singleton y) = 0 function bag_union bag bag : bag axiom occ_union : forall x:int, b1:bag, b2:bag. occ x (bag_union b1 b2) = (occ x b1 + occ x b2) lemma l2 : f1 1 = 2 end [jessie3] Dealing with task 1 [jessie3] Status with CVC3 2.4.1: Valid [jessie3] Status with CVC3 2.2: Valid [jessie3] Status with Z3 4.0: Valid [jessie3] Status with Z3 3.2: Valid [jessie3] Status with Alt-Ergo 0.94: Valid [jessie3] running theory 1: [jessie3] theory Decls1 [jessie3] theory Top1 (* use BuiltIn *) (* use int.Int *) (* use real.Real *) lemma l2 : (6 + 7) = 13 (* use BagInt *) lemma union_comm : forall b1:bag, b2:bag. bag_union b1 b2 = bag_union b2 b1 end [jessie3] Dealing with task 1 [jessie3] Status with CVC3 2.4.1: Valid [jessie3] Status with CVC3 2.2: Valid [jessie3] Status with Z3 4.0: Valid [jessie3] Status with Z3 3.2: Valid [jessie3] Status with Alt-Ergo 0.94: Valid [jessie3] Status with Alt-Ergo 0.94: Unknown
 [kernel] preprocessing with "gcc -C -E -I. tests/basic/forty-two.c" [jessie3] processing function f [jessie3] user error: WARNING: Variable Frama_C_copy_block not translated [jessie3] user error: WARNING: Variable Frama_C_bzero not translated [jessie3] user error: WARNING: Variable Frama_C_copy_block not translated [jessie3] processing function f [jessie3] found 0 decls [jessie3] made 0 theories
 [kernel] preprocessing with "gcc -C -E -I. tests/basic/generic.c" tests/basic/generic.c:15:[kernel] user error: unbound function f1 in annotation. [kernel] user error: skipping file "tests/basic/generic.c" that has errors. [kernel] Frama-C aborted: invalid user input.
 [kernel] preprocessing with "gcc -C -E -I. tests/basic/isqrt.c" [jessie3] processing function main [jessie3] user error: WARNING: Variable Frama_C_bzero not translated [jessie3] user error: WARNING: Variable Frama_C_copy_block not translated [jessie3] creating logic symbol 739 (sqr) [jessie3] processing function isqrt [kernel] Plug-in jessie3 aborted: unimplemented feature. You may send a feature request at http://bts.frama-c.com with: '[Plug-in jessie3] ctype'.
 [kernel] preprocessing with "gcc -C -E -I. tests/basic/lemma.c" [jessie3] user error: WARNING: Variable Frama_C_copy_block not translated [jessie3] user error: WARNING: Variable Frama_C_bzero not translated [jessie3] user error: WARNING: Variable Frama_C_copy_block not translated [jessie3] found 7 decls [jessie3] made 1 theories [jessie3] running theory 1: [jessie3] theory Decls [jessie3] theory Top (* use BuiltIn *) (* use int.Int *) ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!