source: CIVL/examples/languageFeatures/bigO.cvl@ 90dd7d7

1.23 2.0 main test-branch
Last change on this file since 90dd7d7 was ef21fe4, checked in by Tim Zirkel <zirkeltk@…>, 12 years ago

Added bigO test

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@404 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 278 bytes
Line 
1#include<civlc.h>
2$input double y;
3
4void main() {
5 $assume y > 10;
6 $assume $forall {int i | i > 0} $forall {double x | x > 0} i*x == $O(x);
7 $assume $forall {double z | z > 0} z*$O(z) == $O(z*z);
8 $assert 6.0 == $O(1);
9 $assert 3*y == $O(y);
10 $assert 3*y*y == $O(y*y);
11}
Note: See TracBrowser for help on using the repository browser.