fix: a star in docs
This commit is contained in:
30
logic/test_cases/q1/plTrueInverse.test
Normal file
30
logic/test_cases/q1/plTrueInverse.test
Normal file
@ -0,0 +1,30 @@
|
||||
class: "EvalTest"
|
||||
success: "PASS"
|
||||
failure: "NO PASS"
|
||||
|
||||
# Python statements initializing variables for the test below.
|
||||
preamble: """
|
||||
import logic
|
||||
from logicPlan import plTrueInverse, findModel, sentence1, sentence3, modelToString
|
||||
|
||||
A = logic.PropSymbolExpr('A')
|
||||
B = logic.PropSymbolExpr('B')
|
||||
|
||||
results = {}
|
||||
for expr in [A, A >> B, sentence1(), sentence3()]:
|
||||
model = findModel(expr)
|
||||
results[~expr] = plTrueInverse(model, ~expr), model
|
||||
results[expr] = plTrueInverse(model, expr), model
|
||||
|
||||
ans = ''
|
||||
for key, value in results.items():
|
||||
ans += modelToString(value[1]) + ' does not satisfy ' + repr(key) + ' : ' + str(value[0]) + '. '
|
||||
|
||||
"""
|
||||
|
||||
# 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