| for statement in scop['statements']: |
| domain = domain.union(isl.USet(statement['domain'])) |
| for statement in scop['statements']: |
| for access in statement['accesses']: |
| if access['kind'] == 'read': |
| read = read.union(isl.UMap(access['relation'])) |
| for statement in scop['statements']: |
| for access in statement['accesses']: |
| if access['kind'] == 'write': |
| write = write.union(isl.UMap(access['relation'])) |
| schedule = isl.UMap('{}') |
| for statement in scop['statements']: |
| schedule = schedule.union(isl.UMap(statement['schedule'])) |
| print str(schedule) + ";" |
| description = 'Translate JSCoP into iscc input' |
| parser = argparse.ArgumentParser(description) |
| parser.add_argument('inputFile', metavar='N', type=file, |
| args = parser.parse_args() |
| inputFile = args.inputFile |
| scop = json.load(inputFile) |
| print 'Dep := (last W before R under S)[0];' |
| print 'schedule D respecting Dep minimizing Dep;' |