Open favu100 opened 2 years ago
java -jar B2Program-all-0.1.0-SNAPSHOT.jar -l java -mc true -f benchmarks/model_checking/ProB/Other/EqualityLaws.mch
cp benchmarks/model_checking/ProB/Other/*.java .
javac -cp .:btypes.jar EqualityLaws.java
EqualityLaws.java:279: error: illegal start of type
return new BSet<BSet
java -jar B2Program-all-0.1.0-SNAPSHOT.jar -l java -mc true -f benchmarks/model_checking/ProB/Other/EqualityLaws.mch cp benchmarks/model_checking/ProB/Other/*.java . javac -cp .:btypes.jar EqualityLaws.java EqualityLaws.java:279: error: illegal start of type return new BSet
(new BSet()).unequal(new BSet ()).booleanValue(); ^ ...
The latter is fixed now
The universal and existential quantifiers seem to be the problem for the invariant violation
For C++, there are other problems
$ time make SetLaws LANGUAGE=java DIRECTORY=benchmarks/model_checking/ProB/Other
java -jar B2Program-all-0.1.0-SNAPSHOT.jar -l java -mc true -f benchmarks/model_checking/ProB/Other/SetLaws.mch
cp benchmarks/model_checking/ProB/Other/*.java .
javac -cp .:btypes.jar SetLaws.java
SetLaws.java:560: error: incompatible types: BSet cannot be converted to BSet<BSet>
for(BSet _ic_ss_1 : SS.pow().difference(SS)) {
is fixed now. However, there are still invariant violations (similar to C++).
This issue is caused by conditionalPredicate in the quantified predicate template: quantified_predicate
java -jar B2Program-all-0.1.0-SNAPSHOT.jar -l java -mc true -f benchmarks/model_checking/ProB/Other/tictac.mch
cp benchmarks/model_checking/ProB/Other/*.java .
javac -cp .:btypes.jar tictac.java
tictac.java:127: error: incompatible types: no instance(s) of type variable(s) S,T exist so that BRelation<S,T> conforms to BSet<BTuple<BInteger,BInteger>>
return square.checkDomain(BRelation.cartesianProduct(BSet.interval(new BInteger(1), new BInteger(3)), BSet.interval(new BInteger(1), new BInteger(3)))).and(square.checkRange(BSet.interval(new BInteger(0), new BInteger(1)))).and(square.isFunction()).and(square.isPartial(BRelation.cartesianProduct(BSet.interval(new BInteger(1), new BInteger(3)), BSet.interval(new BInteger(1), new BInteger(3))))).booleanValue();
...
Check domain and check range should be implemented for both types: BSet and BRelation
$ time make SetLaws LANGUAGE=java DIRECTORY=benchmarks/model_checking/ProB/Other java -jar B2Program-all-0.1.0-SNAPSHOT.jar -l java -mc true -f benchmarks/model_checking/ProB/Other/SetLaws.mch cp benchmarks/model_checking/ProB/Other/*.java . javac -cp .:btypes.jar SetLaws.java SetLaws.java:560: error: incompatible types: BSet cannot be converted to BSet<BSet> for(BSet _ic_ss_1 : SS.pow().difference(SS)) {
is fixed now. However, there are still invariant violations (similar to C++).
This issue is caused by conditionalPredicate in the quantified predicate template:
quantified_predicate
This issue should be fixed for Java now. Still, the C++ implementation for strictSubset seems to be wrong.
Edit: This issue is now solved for C++ as well
java -jar B2Program-all-0.1.0-SNAPSHOT.jar -l java -mc true -f benchmarks/model_checking/ProB/Other/tictac.mch cp benchmarks/model_checking/ProB/Other/*.java . javac -cp .:btypes.jar tictac.java tictac.java:127: error: incompatible types: no instance(s) of type variable(s) S,T exist so that BRelation<S,T> conforms to BSet<BTuple<BInteger,BInteger>> return square.checkDomain(BRelation.cartesianProduct(BSet.interval(new BInteger(1), new BInteger(3)), BSet.interval(new BInteger(1), new BInteger(3)))).and(square.checkRange(BSet.interval(new BInteger(0), new BInteger(1)))).and(square.isFunction()).and(square.isPartial(BRelation.cartesianProduct(BSet.interval(new BInteger(1), new BInteger(3)), BSet.interval(new BInteger(1), new BInteger(3))))).booleanValue(); ...
Check domain and check range should be implemented for both types: BSet and BRelation
So this is the last issue to be fixed. isPartial
is also affected
java -jar B2Program-all-0.1.0-SNAPSHOT.jar -l java -mc true -f benchmarks/model_checking/ProB/Other/tictac.mch cp benchmarks/model_checking/ProB/Other/*.java . javac -cp .:btypes.jar tictac.java tictac.java:127: error: incompatible types: no instance(s) of type variable(s) S,T exist so that BRelation<S,T> conforms to BSet<BTuple<BInteger,BInteger>> return square.checkDomain(BRelation.cartesianProduct(BSet.interval(new BInteger(1), new BInteger(3)), BSet.interval(new BInteger(1), new BInteger(3)))).and(square.checkRange(BSet.interval(new BInteger(0), new BInteger(1)))).and(square.isFunction()).and(square.isPartial(BRelation.cartesianProduct(BSet.interval(new BInteger(1), new BInteger(3)), BSet.interval(new BInteger(1), new BInteger(3))))).booleanValue(); ...
Check domain and check range should be implemented for both types: BSet and BRelation
So this is the last issue to be fixed.
isPartial
is also affected
This issue is now also fixed for Java (but not yet for C++)
The last bug is also fixed now
Another type error has been discovered:
BoolLaws_SetCompr.java:359: error: method cartesianProduct in class BRelation<S#2,T#2> cannot be applied to given types;
return _ic_set_20.equal(BRelation.cartesianProduct(BRelation.cartesianProduct(BUtils.BOOL, BUtils.BOOL), BUtils.BOOL)).booleanValue();
^
required: BSet<S#1>,BSet<T#1>
found: BRelation<BBoolean,BBoolean>,BSet
This issue is solved now
Run SetLaws, RelLaws, and FunLaws etc. Files with RelLaws and FunLaws could still have some errors
java -jar B2Program-all-0.1.0-SNAPSHOT.jar -l java -mc true -f benchmarks/model_checking/ProB/Other/tictac.mch cp benchmarks/model_checking/ProB/Other/*.java . javac -cp .:btypes.jar tictac.java tictac.java:127: error: incompatible types: no instance(s) of type variable(s) S,T exist so that BRelation<S,T> conforms to BSet<BTuple<BInteger,BInteger>> return square.checkDomain(BRelation.cartesianProduct(BSet.interval(new BInteger(1), new BInteger(3)), BSet.interval(new BInteger(1), new BInteger(3)))).and(square.checkRange(BSet.interval(new BInteger(0), new BInteger(1)))).and(square.isFunction()).and(square.isPartial(BRelation.cartesianProduct(BSet.interval(new BInteger(1), new BInteger(3)), BSet.interval(new BInteger(1), new BInteger(3))))).booleanValue(); ...
$ time make SetLaws LANGUAGE=java DIRECTORY=benchmarks/model_checking/ProB/Other java -jar B2Program-all-0.1.0-SNAPSHOT.jar -l java -mc true -f benchmarks/model_checking/ProB/Other/SetLaws.mch cp benchmarks/model_checking/ProB/Other/*.java . javac -cp .:btypes.jar SetLaws.java SetLaws.java:560: error: incompatible types: BSet cannot be converted to BSet<BSet>
for(BSet _ic_ss_1 : SS.pow().difference(SS)) {
^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
make: *** [SetLaws] Error 1