fix: a star in docs
This commit is contained in:
2
logic/test_cases/q2/CONFIG
Normal file
2
logic/test_cases/q2/CONFIG
Normal file
@ -0,0 +1,2 @@
|
||||
class: "PassAllTestsQuestion"
|
||||
max_points: "2"
|
3
logic/test_cases/q2/atLeastOne.solution
Normal file
3
logic/test_cases/q2/atLeastOne.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q2/atLeastOne.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "False True True"
|
33
logic/test_cases/q2/atLeastOne.test
Normal file
33
logic/test_cases/q2/atLeastOne.test
Normal file
@ -0,0 +1,33 @@
|
||||
class: "LogicTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# Python statements initializing variables for the test below.
|
||||
preamble: """
|
||||
import logic
|
||||
|
||||
A = logic.PropSymbolExpr('A');
|
||||
B = logic.PropSymbolExpr('B');
|
||||
C = logic.PropSymbolExpr('C');
|
||||
D = logic.PropSymbolExpr('D');
|
||||
symbols = [A, B, C, D]
|
||||
|
||||
atleast1 = logicPlan.atLeastOne(symbols)
|
||||
|
||||
model1 = {A:False, B:False, C:False, D:False}
|
||||
model2 = {A:False, B:True, C:False, D:False}
|
||||
model3 = {A:True, B:True, C:False, D:False}
|
||||
|
||||
ans1 = logic.pl_true(atleast1,model1)
|
||||
ans2 = logic.pl_true(atleast1,model2)
|
||||
ans3 = logic.pl_true(atleast1,model3)
|
||||
|
||||
ans = [ans1, ans2, ans3]
|
||||
"""
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
|
||||
test: "ans"
|
||||
|
||||
|
3
logic/test_cases/q2/atLeastOneCNF.solution
Normal file
3
logic/test_cases/q2/atLeastOneCNF.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q2/atLeastOneCNF.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "True"
|
20
logic/test_cases/q2/atLeastOneCNF.test
Normal file
20
logic/test_cases/q2/atLeastOneCNF.test
Normal file
@ -0,0 +1,20 @@
|
||||
class: "EvalTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# Python statements initializing variables for the test below.
|
||||
preamble: """
|
||||
import logic
|
||||
|
||||
A = logic.Expr('A')
|
||||
B = logic.Expr('B')
|
||||
C = logic.Expr('C')
|
||||
D = logic.Expr('D')
|
||||
expr = logicPlan.atLeastOne([A, B, C, D])
|
||||
"""
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
|
||||
test: "logic.is_valid_cnf(expr)"
|
||||
|
3
logic/test_cases/q2/atLeastOneEff.solution
Normal file
3
logic/test_cases/q2/atLeastOneEff.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q2/atLeastOne.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "1"
|
25
logic/test_cases/q2/atLeastOneEff.test
Normal file
25
logic/test_cases/q2/atLeastOneEff.test
Normal file
@ -0,0 +1,25 @@
|
||||
class: "LogicTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# Python statements initializing variables for the test below.
|
||||
preamble: """
|
||||
import logic
|
||||
logic.Expr.counter = 0
|
||||
|
||||
A = logic.PropSymbolExpr('A');
|
||||
B = logic.PropSymbolExpr('B');
|
||||
C = logic.PropSymbolExpr('C');
|
||||
D = logic.PropSymbolExpr('D');
|
||||
symbols = [A, B, C, D]
|
||||
|
||||
atleast1 = logicPlan.atLeastOne(symbols)
|
||||
num_nodes = logic.Expr.counter
|
||||
|
||||
ans = [num_nodes]
|
||||
"""
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
|
||||
test: "ans"
|
3
logic/test_cases/q2/atMostOne.solution
Normal file
3
logic/test_cases/q2/atMostOne.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q2/atMostOne.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "True True False"
|
32
logic/test_cases/q2/atMostOne.test
Normal file
32
logic/test_cases/q2/atMostOne.test
Normal file
@ -0,0 +1,32 @@
|
||||
class: "LogicTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# Python statements initializing variables for the test below.
|
||||
preamble: """
|
||||
import logic
|
||||
|
||||
A = logic.PropSymbolExpr('A');
|
||||
B = logic.PropSymbolExpr('B');
|
||||
C = logic.PropSymbolExpr('C');
|
||||
D = logic.PropSymbolExpr('D');
|
||||
symbols = [A, B, C, D]
|
||||
|
||||
atmost1 = logicPlan.atMostOne(symbols)
|
||||
|
||||
model1 = {A:False, B:False, C:False, D:False}
|
||||
model2 = {A:False, B:True, C:False, D:False}
|
||||
model3 = {A:False, B:True, C:False, D:True}
|
||||
|
||||
ans1 = logic.pl_true(atmost1,model1)
|
||||
ans2 = logic.pl_true(atmost1,model2)
|
||||
ans3 = logic.pl_true(atmost1,model3)
|
||||
|
||||
ans = [ans1, ans2, ans3]
|
||||
"""
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
test: "ans"
|
||||
|
||||
|
3
logic/test_cases/q2/atMostOneCNF.solution
Normal file
3
logic/test_cases/q2/atMostOneCNF.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q2/atMostOneCNF.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "True"
|
20
logic/test_cases/q2/atMostOneCNF.test
Normal file
20
logic/test_cases/q2/atMostOneCNF.test
Normal file
@ -0,0 +1,20 @@
|
||||
class: "EvalTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# Python statements initializing variables for the test below.
|
||||
preamble: """
|
||||
import logic
|
||||
|
||||
A = logic.Expr('A')
|
||||
B = logic.Expr('B')
|
||||
C = logic.Expr('C')
|
||||
D = logic.Expr('D')
|
||||
expr = logicPlan.atMostOne([A, B, C, D])
|
||||
"""
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
|
||||
test: "logic.is_valid_cnf(expr)"
|
||||
|
4
logic/test_cases/q2/atMostOneEff.solution
Normal file
4
logic/test_cases/q2/atMostOneEff.solution
Normal file
@ -0,0 +1,4 @@
|
||||
# This is the solution file for test_cases/q2/atMostOne.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "19"
|
||||
result0: "11"
|
26
logic/test_cases/q2/atMostOneEff.test
Normal file
26
logic/test_cases/q2/atMostOneEff.test
Normal file
@ -0,0 +1,26 @@
|
||||
class: "LogicTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# Python statements initializing variables for the test below.
|
||||
preamble: """
|
||||
import logic
|
||||
logic.Expr.counter = 0
|
||||
|
||||
A = logic.PropSymbolExpr('A');
|
||||
B = logic.PropSymbolExpr('B');
|
||||
C = logic.PropSymbolExpr('C');
|
||||
D = logic.PropSymbolExpr('D');
|
||||
symbols = [A, B, C, D]
|
||||
|
||||
atmost1 = logicPlan.atMostOne(symbols)
|
||||
num_nodes = logic.Expr.counter
|
||||
|
||||
ans = [num_nodes]
|
||||
"""
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
test: "ans"
|
||||
|
||||
|
3
logic/test_cases/q2/exactlyOne.solution
Normal file
3
logic/test_cases/q2/exactlyOne.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q2/exactlyOne.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "False True False"
|
33
logic/test_cases/q2/exactlyOne.test
Normal file
33
logic/test_cases/q2/exactlyOne.test
Normal file
@ -0,0 +1,33 @@
|
||||
class: "LogicTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# Python statements initializing variables for the test below.
|
||||
preamble: """
|
||||
import logic
|
||||
|
||||
A = logic.PropSymbolExpr('A');
|
||||
B = logic.PropSymbolExpr('B');
|
||||
C = logic.PropSymbolExpr('C');
|
||||
D = logic.PropSymbolExpr('D');
|
||||
symbols = [A, B, C, D]
|
||||
|
||||
exactly1 = logicPlan.exactlyOne(symbols)
|
||||
|
||||
model1 = {A:False, B:False, C:False, D:False}
|
||||
model2 = {A:False, B:True, C:False, D:False}
|
||||
model3 = {A:False, B:True, C:False, D:True}
|
||||
|
||||
ans1 = logic.pl_true(exactly1,model1)
|
||||
ans2 = logic.pl_true(exactly1,model2)
|
||||
ans3 = logic.pl_true(exactly1,model3)
|
||||
|
||||
ans = [ans1, ans2, ans3]
|
||||
|
||||
"""
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
test: "ans"
|
||||
|
||||
|
3
logic/test_cases/q2/exactlyOneCNF.solution
Normal file
3
logic/test_cases/q2/exactlyOneCNF.solution
Normal file
@ -0,0 +1,3 @@
|
||||
# This is the solution file for test_cases/q2/exactlyOneCNF.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "True"
|
20
logic/test_cases/q2/exactlyOneCNF.test
Normal file
20
logic/test_cases/q2/exactlyOneCNF.test
Normal file
@ -0,0 +1,20 @@
|
||||
class: "EvalTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# Python statements initializing variables for the test below.
|
||||
preamble: """
|
||||
import logic
|
||||
|
||||
A = logic.Expr('A')
|
||||
B = logic.Expr('B')
|
||||
C = logic.Expr('C')
|
||||
D = logic.Expr('D')
|
||||
expr = logicPlan.exactlyOne([A, B, C, D])
|
||||
"""
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
|
||||
test: "logic.is_valid_cnf(expr)"
|
||||
|
4
logic/test_cases/q2/exactlyOneEff.solution
Normal file
4
logic/test_cases/q2/exactlyOneEff.solution
Normal file
@ -0,0 +1,4 @@
|
||||
# This is the solution file for test_cases/q2/exactlyOne.test.
|
||||
# The result of evaluating the test must equal the below when cast to a string.
|
||||
result: "21"
|
||||
result0: "13"
|
27
logic/test_cases/q2/exactlyOneEff.test
Normal file
27
logic/test_cases/q2/exactlyOneEff.test
Normal file
@ -0,0 +1,27 @@
|
||||
class: "LogicTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# Python statements initializing variables for the test below.
|
||||
preamble: """
|
||||
import logic
|
||||
logic.Expr.counter = 0
|
||||
|
||||
A = logic.PropSymbolExpr('A');
|
||||
B = logic.PropSymbolExpr('B');
|
||||
C = logic.PropSymbolExpr('C');
|
||||
D = logic.PropSymbolExpr('D');
|
||||
symbols = [A, B, C, D]
|
||||
|
||||
exactly1 = logicPlan.exactlyOne(symbols)
|
||||
num_nodes = logic.Expr.counter
|
||||
|
||||
ans = [num_nodes]
|
||||
|
||||
"""
|
||||
|
||||
# A python expression to be evaluated. This expression must return the
|
||||
# same result for the student and instructor's code.
|
||||
test: "ans"
|
||||
|
||||
|
Reference in New Issue
Block a user