source: doc/papers/general/evaluation/cfa-pair.c@ 54f89d5

ADT arm-eh ast-experimental enum forall-pointer-decay jacob/cs343-translation new-ast-unique-expr pthread-emulation qualifiedEnum
Last change on this file since 54f89d5 was 79d4186, checked in by Aaron Moss <a3moss@…>, 8 years ago

Update evaluation code for paper

  • Property mode set to 100644
File size: 1.4 KB
RevLine 
[604e76d]1#include "cfa-pair.h"
[c9b3a41]2#include "fstream"
[604e76d]3
[000ff2c]4forall(otype R, otype S
[604e76d]5 | { int ?==?(R, R); int ?<?(R, R); int ?<?(S, S); })
6int ?<?(pair(R, S) p, pair(R, S) q) {
7 return p.first < q.first || ( p.first == q.first && p.second < q.second );
8}
9
[000ff2c]10forall(otype R, otype S
[604e76d]11 | { int ?==?(R, R); int ?<?(R, R); int ?<=?(S, S); })
12int ?<=?(pair(R, S) p, pair(R, S) q) {
13 return p.first < q.first || ( p.first == q.first && p.second <= q.second );
14}
15
16forall(otype R, otype S | { int ?==?(R, R); int ?==?(S, S); })
17int ?==?(pair(R, S) p, pair(R, S) q) {
18 return p.first == q.first && p.second == q.second;
19}
20
21forall(otype R, otype S | { int ?!=?(R, R); int ?!=?(S, S); })
22int ?!=?(pair(R, S) p, pair(R, S) q) {
23 return p.first != q.first || p.second != q.second;
24}
25
[000ff2c]26forall(otype R, otype S
[604e76d]27 | { int ?==?(R, R); int ?>?(R, R); int ?>?(S, S); })
28int ?>?(pair(R, S) p, pair(R, S) q) {
29 return p.first > q.first || ( p.first == q.first && p.second > q.second );
30}
31
[000ff2c]32forall(otype R, otype S
[604e76d]33 | { int ?==?(R, R); int ?>?(R, R); int ?>=?(S, S); })
34int ?>=?(pair(R, S) p, pair(R, S) q) {
35 return p.first > q.first || ( p.first == q.first && p.second >= q.second );
36}
[c9b3a41]37
[79d4186]38// forall(otype R, otype S)
39// forall(dtype ostype | ostream( ostype ) | { ostype & ?|?( ostype &, R ); ostype & ?|?( ostype &, S ); })
40// ostype & ?|?( ostype & os, pair(R, S) p ) {
41// return os | '[' | p.first | ',' | p.second | ']';
42// } // ?|?
Note: See TracBrowser for help on using the repository browser.