#! /usr/bin/env python

import mace
import dense

def expand(template):
    m = mace.Mace()
    act_op = [("add", "+"), ("sub", "-"), ("mul", "*"), ("div", "/")]
    for t in act_op:
        m["act"] = t[0]
        m["op"] = t[1]
        for line in m.expand_lines(template):
            print(line)


def main():
    expand(dense.vec_act_vec.split("\n"))
    expand(dense.vec_act_sca.split("\n"))
    expand(dense.vec_self_act_vec.split("\n"))
    expand(dense.vec_self_act_sca.split("\n"))


if __name__ == "__main__":
    main()
