File: example2.cpp

package info (click to toggle)
mcrl2 201409.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd
  • size: 46,348 kB
  • ctags: 29,960
  • sloc: cpp: 213,160; ansic: 16,219; python: 13,238; yacc: 309; lex: 214; xml: 197; makefile: 83; sh: 82; pascal: 17
file content (24 lines) | stat: -rwxr-xr-x 904 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "mcrl2/data/data.h"
#include "mcrl2/data/parse.h"
#include <iostream>

using namespace mcrl2::data;

int main(int argc, char* argv[])
{

  // note that the newline characters are significant
  data_specification data_spec = parse_data_specification(
                                   "sort                      \n"
                                   "  Bit   = struct b0 | b1; \n"
                                   "                          \n"
                                   "map                       \n"
                                   "  invert: Bit -> Bit;     \n"
                                   "                          \n"
                                   "eqn                       \n"
                                   "  invert(b1)= b0;         \n"
                                   "  invert(b0)= b1;         \n"
                                 );

  return 0;
}