File: murphi2murphi-basic

package info (click to toggle)
rumur 2025.08.31-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,644 kB
  • sloc: cpp: 18,711; ansic: 3,825; python: 1,578; objc: 1,542; yacc: 568; sh: 331; lex: 241; lisp: 15; makefile: 5
file content (35 lines) | stat: -rwxr-xr-x 690 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env bash

# a basic test that murphi2murphi produces valid Murphi

if [ -z "${AUTOPKGTEST_TMP}" ]; then
  printf 'AUTOPKGTEST_TMP not set; not running in autopkgtest?\n' >&2
  exit 1
fi

set -e
set -x

# move to temporary directory
mkdir -p ${AUTOPKGTEST_TMP}/murphi2murphi-basic
cd ${AUTOPKGTEST_TMP}/murphi2murphi-basic

# construct a simple model with omitted semi-colons
cat - >model.m <<EOT
var
  x: boolean

startstate begin
  x := true;
end

rule begin
  x := !x;
end
EOT

# ask murphi2murphi to add semi-colons
murphi2murphi --output transformed.m --explicit-semicolons model.m

# confirm that rumur thinks the result is acceptable
rumur --output /dev/null transformed.m