New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Forbidden words #508
Comments
Sorry, not sure what you mean here. By default, spaces are not permitted in student's expressions. E.g. by default you get "Illegal spaces found in expression 2_x." |
Sorry I'm referring to a "String" input by students; for istance I want a Boolean expression like AB'+A'B and I want to refuse the string "AB' + A'B". |
The "String" input does not actually enforce any forbidden words, they just happen to be present in the question editor due to the limitations of the editor. Have you considered just removing the spaces from the input in the feedback variables before using the value in the PRT?
The whole forbidden words system exists to stop students from calling certain functions in inputs with evaluatable values but strings are not evaluated so they do not apply to them. And I don't see STACK providing any limits for limiting string content. |
Well that is odd the sting input should not do that, and once 4.3 comes out it will most definitely not do that, |
Anyway your suggestion works, thanks! |
Can I just check something? I can see why the ' would be very useful. But, I assume you will want to accept both A*B'+A'*B and A'B+AB'. That problem is much better solved at a mathematical level (+ is commutative) than trying to solve it by a string match. I guess your problems with spaces arise because your string match is failing?! Let's try to solve the real mathematical problems, and not use string matching at all, unless a string match really is what you absolutely want. I am determined to keep STACK mathematical. If you'd like a post-fix "prime" operator, let's add that in? What question are you asking your students? |
Chris, careful now... |
Exactly Matti, we must not confuse ' in Maxima with a new mathematical "prime" operator. But, this is where the value of your new parser really shines. Stage 1 is to implement "opprime" in Maxima, (not "prime" which might be confused with number theory, or primeop which looks like a predicate). Something like this:
Teachers, and all internal maxima code, must use this mechanism. Stage 2: for student input only, add in a flexible parsing rule to inrepret the postfix ' as opprime. This needs to be done, both for student input and when de-parsing the "teacher's answer" back into potential student input. |
Chris, there are things one can do and things one should not do. While it is indeed possible to do what you propose it means that you have now added a feature that needs to be checked and processed for every step everywhere, a feature that has a price, a feature that more than likely is used in a single field and even then for just a specific subset of questions. Do think your solution a few steps further and build some estimates on what are the costs both in evaluation and complexity of execution and weight them against the benefit especially as this specific edge case can be handled with strings no matter how badly they fit the STACK ideology. Personally, I would really suggest you wait for the new parser to actually work and 4.3 to be actually out before starting to think these kinds of extensions. Trust me when I say that what you described is not all that would need to be done and that it will cost and it will cost in a way that cannot be skipped easily. While it will cost in execution the greatest cost will be the cost it will add to us the developers and that is the cost we really need to consider. |
|
Anyway (please forgive my inexperience, I am a beginner with STACK), how can I ask my students a boolean expression? In which way can they write AND, OR, NOT at a mathematical level? |
I'm going to close this issue, because the support for propositional logic addresses the underling issue (I think). We can open future issues for logic if we need to. |
Is it possible to insert the space in "Forbidden words"?
Thanks
The text was updated successfully, but these errors were encountered: