Verifying the reflective visitor pattern
Verifying the reflective visitor pattern
复制标题
DOI:
10.1145/2318202.2318208
复制
发表时间:
2012-06
期刊:
影响因子:
--
通讯作者:
B. Horsfall;Nathaniel Charlton;Bernhard Reus
中科院分区:
文献类型:
--
作者:
B. Horsfall;Nathaniel Charlton;Bernhard Reus
Computational reflection allows a program to inspect and manipulate the structure or behaviour of itself at runtime. Often this means that it is possible to create more generic or adaptable programs in an elegant way. However, there is little support for specification and automatic verification of reflective programs. We address this problem by implementing, specifying, and verifying a reflective library using a Hoare-logic for a simple language with stored procedures. The latter is important since reflective metadata is modelled on the heap, thus method objects will be realised as stored procedures. We verify memory safety as well as functional correctness of an instance of the reflective visitor pattern, including the reflective library. The entire verification is carried out in our (semi-)automatic verification tool Crowfoot.