メタ計算を用いた Continuation based C の検証手法 |
Yasutaka Higa
|
void verifySpecification(struct Context* context, struct Tree* tree) {
assert(!(maxHeight(tree->root, 1) > 2*minHeight(tree->root, 1)));
goto meta(context, EnumerateInputs);
}
__code cs0(int a, int b){
goto cs1(a+b);
}
record ds0 : Set where
field
a : Int
b : Int
__code cs0(int a, int b){
goto cs1(a+b);
}
cs0 : CodeSegment ds0 ds1
cs0 = cs (\d -> goto cs1 (record {c = (ds0.a d) + (ds0.b d)}))
main : ds1
main = goto cs0 (record {a = 100 ; b = 50})
main : Meta
main = gotoMeta push cs0 (record {context = (record {a = 100 ; b = 50 ; c = 70}) ; c' = 0 ; next = (N.cs id)})