code
stringlengths
3
6.57k
turned(X, Y2)
asp_file.write(":- move(X, Z, Y1)
move(X, Z, Y2)
asp_file.write(":- move(X, Z, T1)
turned(X,T2)
nobody_depends_on(X)
asp_file.write("% A program can not be moved and executed at the same time.\n")
asp_file.write(":- move(X, Z1, Y)
move(X, Z2, Y)
asp_file.write("% A program can not be moved to two different locations at the same time.\n")
asp_file.write(":- turned(X1, T1)
turned(X2, T2)
depends_on(X2, X1)
moved(X2,T)
asp_file.write("% A program can executed before all of it's dependencies.\n")
asp_file.write("holds(on(X,Y)
move(X,Y,t)
asp_file.write("holds(on(X,Z)
holds(on(X,Z)
moved(X,t)
asp_file.write("holds(at(X,Y)
turn(X,Y,t)
asp_file.write("holds(at(X,Z)
holds(at(X,Z)
turned(X,t)
asp_file.write("valid_on(X, Y)
thread_cost(X, Z1)
machine_threads(Y, Z2)
asp_file.write(":- os_needed(X, S)
turned_at(X, M, t)
os_on(M, S)
os_needed(X)
asp_file.write(":- holds(on(X,M1)
holds(on(X,M2)
holds(at(X,-done)
asp_file.write("% A program can not be duplicated if it has not been executed.\n")
asp_file.write(":- holds(on(X,M1)
holds(on(X,M2)
task(X1)
task(X2)
depends_on(X1, X)
depends_on(X2, X)
turned_at(X1, M1, T1)
turned_at(X2, M2, T2)
asp_file.write("% A program can not be dupllicated if it is not the dependecy of at least two different later programs which are executed on atleast two diffent machines.\n")
asp_file.write("% An unfinished program can not be at to two different locations at the same time.\n")
asp_file.write("#program check(t)
asp_file.write(":- query(t)
goal(F)
holds(F,t)
asp_file.write("#show move/3.\n")
asp_file.write("#show turned_at/3.\n")
asp_file.write("#program base.\n")
range(len(all_jobs)
job.replace(" ", "")
job.replace(".", "_")
job.lower()
asp_file.write("task("+job+")
all_tasks.append(job)
asp_file.write("os(ubuntu_DE)
asp_file.write("os(centOS_7_DE)
asp_file.write("os(centOS_7_NE)
asp_file.write("os(debian)
asp_file.write("os(red_hat)
asp_file.write("os(no_os)
range(len(all_jobs)
job.replace(" ", "")
job.replace(".", "_")
job.lower()
range(len(all_jobs[i][3])
asp_file.write("cuda_needed("+job+")
asp_file.write("psutil_needed("+job+")
asp_file.write("spacy_needed("+job+")
asp_file.write("clingo_needed("+job+")
range(len(all_macs)
mac.replace(" ", "")
mac.lower()
range(len(all_macs[i][3])
asp_file.write("cuda_on("+mac+")
asp_file.write("psutil_on("+mac+")
asp_file.write("spacy_on("+mac+")
asp_file.write("clingo_on("+mac+")
asp_file.write("% If a toolkit is not on on a machine then this rule is ture for that machine.\n")
asp_file.write("cuda_not_on(X)
location(X)
cuda_on(X)
asp_file.write("spacy_not_on(X)
location(X)
spacy_on(X)
asp_file.write("psutil_not_on(X)
location(X)
psutil_on(X)
asp_file.write("clingo_not_on(X)
location(X)
clingo_on(X)
asp_file.write("% If a task can only be executed on a specific OS then the rule os_needed()
range(len(all_jobs)
job.replace(" ", "")
job.replace(".", "_")
job.lower()