summaryrefslogtreecommitdiff
path: root/vendor/bundle/ruby/3.4.0/gems/rouge-4.7.0/lib/rouge/demos/dafny
blob: 66415a7dca1870303fbd496c3347602d8fc589ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module A {
  const i: int := 56_78
}

method m(b: bool, s: string) {
  var x: string;
  var i: int;
  if b then i := 1; else i := 2;
  i := if b 1 else 2;
  assert b;
  assume b;
  print s;
  expect b;
}

function f(i: int): int { i + 1 }