Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Stephan Falke
committed
Feb 10, 2014
1 parent
792cbc0
commit cd4d33d
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#include "c_interface.h" | ||
|
||
#include <stdio.h> | ||
|
||
int main() | ||
{ | ||
VC vc; | ||
vc = vc_createValidityChecker(); | ||
|
||
Expr x = vc_varExpr(vc, "x", vc_boolType(vc)); | ||
Expr y = vc_varExpr(vc, "y", vc_boolType(vc)); | ||
|
||
Expr x_and_y = vc_andExpr(vc, x, y); | ||
Expr not_x_and_y = vc_notExpr(vc, x_and_y); | ||
|
||
Expr not_x = vc_notExpr(vc, x); | ||
Expr not_y = vc_notExpr(vc, y); | ||
Expr not_x_or_not_y = vc_orExpr(vc, not_x, not_y); | ||
|
||
Expr equiv = vc_iffExpr(vc, not_x_and_y, not_x_or_not_y); | ||
|
||
printf("%d\n", vc_query(vc, equiv)); | ||
|
||
vc_DeleteExpr(equiv); | ||
vc_DeleteExpr(not_x_or_not_y); | ||
vc_DeleteExpr(not_y); | ||
vc_DeleteExpr(not_x); | ||
vc_DeleteExpr(not_x_and_y); | ||
vc_DeleteExpr(x_and_y); | ||
vc_DeleteExpr(y); | ||
vc_DeleteExpr(x); | ||
vc_Destroy(vc); | ||
|
||
return 0; | ||
} |