// File: pfnet-research[P]pml/src/test.cpp
// Function: subst_formula_test::subst_formula_test()
PML_TEST(subst_formula_test) {
    // [true/hoge]hoge == true
    assert_eq(
            *logic::subst(
                make<logic::var_formula_t>("hoge"),
                "hoge", make<logic::top_formula_t>()),
            logic::top_formula_t{});
    // [true/neko](Prob(neko) >= 2/3) == Prob(true) >= 2/3
    assert_eq(
            *logic::subst(
                make<logic::geq_formula_t>(
                    make<logic::prob_term_t>(
                        make<logic::var_formula_t>("neko")),
                    make<logic::div_term_t>(
                        make<logic::int_term_t>(2),
                        make<logic::int_term_t>(3))),
                "neko", make<logic::top_formula_t>()),
            logic::geq_formula_t(
                make<logic::prob_term_t>(
                    make<logic::top_formula_t>()),
                make<logic::div_term_t>(
                    make<logic::int_term_t>(2),
                    make<logic::int_term_t>(3))));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x220(%rbp)
callq 0x71f20
movq -0x220(%rbp), %rax
leaq 0x779db(%rip), %rcx     # 0xe6ac8
movq %rcx, (%rax)
leaq 0x30d83(%rip), %rsi     # 0x9fe7a
leaq -0x38(%rbp), %rdi
callq 0x68c50
jmp 0x6f102
leaq -0x28(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x40ed0
leaq -0x69(%rbp), %rdi
movq %rdi, -0x228(%rbp)
callq 0xa660
movq -0x228(%rbp), %rdx
leaq 0x30d4d(%rip), %rsi     # 0x9fe7a
leaq -0x68(%rbp), %rdi
callq 0x1dd10
jmp 0x6f138
leaq -0x90(%rbp), %rdi
callq 0x681c0
jmp 0x6f146
leaq -0x80(%rbp), %rdi
movq %rdi, -0x230(%rbp)
leaq -0x90(%rbp), %rsi
callq 0x40d40
movq -0x230(%rbp), %rcx
leaq -0x18(%rbp), %rdi
leaq -0x28(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0x1fb70
jmp 0x6f177
leaq -0x18(%rbp), %rdi
callq 0x115e0
movq %rax, -0x238(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x474b0
jmp 0x6f195
movq -0x238(%rbp), %rsi
movq -0x220(%rbp), %rdi
leaq -0x98(%rbp), %rdx
callq 0x82ba0
jmp 0x6f1b1
leaq -0x98(%rbp), %rdi
callq 0x47500
leaq -0x18(%rbp), %rdi
callq 0x16150
leaq -0x80(%rbp), %rdi
callq 0x16150
leaq -0x90(%rbp), %rdi
callq 0x40d70
leaq -0x68(%rbp), %rdi
callq 0xa240
leaq -0x69(%rbp), %rdi
callq 0xa420
leaq -0x28(%rbp), %rdi
callq 0x16150
leaq -0x38(%rbp), %rdi
callq 0x40f00
leaq 0x30c79(%rip), %rsi     # 0x9fe7f
leaq -0xe8(%rbp), %rdi
callq 0x68c50
jmp 0x6f214
leaq -0xd8(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x68b80
jmp 0x6f229
movl $0x2, -0x10c(%rbp)
leaq -0x108(%rbp), %rdi
leaq -0x10c(%rbp), %rsi
callq 0x68d00
jmp 0x6f248
movl $0x3, -0x124(%rbp)
leaq -0x120(%rbp), %rdi
leaq -0x124(%rbp), %rsi
callq 0x68d00
jmp 0x6f267
leaq -0xf8(%rbp), %rdi
leaq -0x108(%rbp), %rsi
leaq -0x120(%rbp), %rdx
callq 0x68cc0
jmp 0x6f283
leaq -0xc8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
leaq -0xf8(%rbp), %rdx
callq 0x68c80
jmp 0x6f29f
leaq -0xb8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x253e0
leaq -0x149(%rbp), %rdi
movq %rdi, -0x240(%rbp)
callq 0xa660
movq -0x240(%rbp), %rdx
leaq 0x30bac(%rip), %rsi     # 0x9fe7f
leaq -0x148(%rbp), %rdi
callq 0x1dd10
jmp 0x6f2e1
leaq -0x170(%rbp), %rdi
callq 0x681c0
jmp 0x6f2ef
leaq -0x160(%rbp), %rdi
movq %rdi, -0x248(%rbp)
leaq -0x170(%rbp), %rsi
callq 0x40d40
movq -0x248(%rbp), %rcx
leaq -0xa8(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
leaq -0x148(%rbp), %rdx
callq 0x1fb70
jmp 0x6f32c
leaq -0xa8(%rbp), %rdi
callq 0x115e0
movq %rax, -0x250(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x681c0
jmp 0x6f34d
leaq -0x1b8(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x68d30
jmp 0x6f362
leaq -0x1a8(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x25110
movl $0x2, -0x1fc(%rbp)
leaq -0x1f8(%rbp), %rdi
leaq -0x1fc(%rbp), %rsi
callq 0x68d00
jmp 0x6f394
movl $0x3, -0x214(%rbp)
leaq -0x210(%rbp), %rdi
leaq -0x214(%rbp), %rsi
callq 0x68d00
jmp 0x6f3b3
leaq -0x1e8(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
leaq -0x210(%rbp), %rdx
callq 0x68cc0
jmp 0x6f3cf
leaq -0x1d8(%rbp), %rdi
movq %rdi, -0x258(%rbp)
leaq -0x1e8(%rbp), %rsi
callq 0x250c0
movq -0x258(%rbp), %rdx
leaq -0x198(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x2e280
jmp 0x6f405
movq -0x250(%rbp), %rsi
movq -0x220(%rbp), %rdi
leaq -0x198(%rbp), %rdx
callq 0x82df0
jmp 0x6f421
leaq -0x198(%rbp), %rdi
callq 0x2e2e0
leaq -0x1d8(%rbp), %rdi
callq 0x25000
leaq -0x1e8(%rbp), %rdi
callq 0x250f0
leaq -0x210(%rbp), %rdi
callq 0x40a10
leaq -0x1f8(%rbp), %rdi
callq 0x40a10
leaq -0x1a8(%rbp), %rdi
callq 0x25000
leaq -0x1b8(%rbp), %rdi
callq 0x25140
leaq -0x1c8(%rbp), %rdi
callq 0x40d70
leaq -0xa8(%rbp), %rdi
callq 0x16150
leaq -0x160(%rbp), %rdi
callq 0x16150
leaq -0x170(%rbp), %rdi
callq 0x40d70
leaq -0x148(%rbp), %rdi
callq 0xa240
leaq -0x149(%rbp), %rdi
callq 0xa420
leaq -0xb8(%rbp), %rdi
callq 0x16150
leaq -0xc8(%rbp), %rdi
callq 0x25410
leaq -0xf8(%rbp), %rdi
callq 0x250f0
leaq -0x120(%rbp), %rdi
callq 0x40a10
leaq -0x108(%rbp), %rdi
callq 0x40a10
leaq -0xd8(%rbp), %rdi
callq 0x25140
leaq -0xe8(%rbp), %rdi
callq 0x40f00
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6f7a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6f5a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6f599
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6f584
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6f57b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x47500
leaq -0x18(%rbp), %rdi
callq 0x16150
leaq -0x80(%rbp), %rdi
callq 0x16150
leaq -0x90(%rbp), %rdi
callq 0x40d70
leaq -0x68(%rbp), %rdi
callq 0xa240
leaq -0x69(%rbp), %rdi
callq 0xa420
leaq -0x28(%rbp), %rdi
callq 0x16150
leaq -0x38(%rbp), %rdi
callq 0x40f00
jmp 0x6f7a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6f794
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6f788
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6f77c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6f770
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6f764
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6f740
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6f734
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6f71c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6f710
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6f704
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6f6ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6f6e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6f6d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x6f6bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x2e2e0
leaq -0x1d8(%rbp), %rdi
callq 0x25000
leaq -0x1e8(%rbp), %rdi
callq 0x250f0
leaq -0x210(%rbp), %rdi
callq 0x40a10
leaq -0x1f8(%rbp), %rdi
callq 0x40a10
leaq -0x1a8(%rbp), %rdi
callq 0x25000
leaq -0x1b8(%rbp), %rdi
callq 0x25140
leaq -0x1c8(%rbp), %rdi
callq 0x40d70
leaq -0xa8(%rbp), %rdi
callq 0x16150
leaq -0x160(%rbp), %rdi
callq 0x16150
leaq -0x170(%rbp), %rdi
callq 0x40d70
leaq -0x148(%rbp), %rdi
callq 0xa240
leaq -0x149(%rbp), %rdi
callq 0xa420
leaq -0xb8(%rbp), %rdi
callq 0x16150
leaq -0xc8(%rbp), %rdi
callq 0x25410
leaq -0xf8(%rbp), %rdi
callq 0x250f0
leaq -0x120(%rbp), %rdi
callq 0x40a10
leaq -0x108(%rbp), %rdi
callq 0x40a10
leaq -0xd8(%rbp), %rdi
callq 0x25140
leaq -0xe8(%rbp), %rdi
callq 0x40f00
movq -0x220(%rbp), %rdi
callq 0x71f80
movq -0x40(%rbp), %rdi
callq 0xa650
nopw %cs:(%rax,%rax)
nop