Access Control is now enabled for Gitlab Pages so you can now restrict Pages to authorized users only. If needed, make your website publicly available : Navigate to your project's Settings > General > Visibility and select Everyone in pages section.

Commit 6909e363 authored by Tony Licata's avatar Tony Licata

Corrected ProloGraal that wasn't passing unit tests anymore due to new...

Corrected ProloGraal that wasn't passing unit tests anymore due to new infrastructure, only ProloGraalVariable.revertState() method had to be changed.
ProloGraal now passes all previous unit tests again.
parent b6fe9f38
......@@ -236,7 +236,7 @@ public final class ProloGraalVariable extends ProloGraalTerm<ProloGraalVariable>
public void saveState() {
//System.out.println("Saving state " + this);
states.push(new ProloGraalVariable(this));
if (this.isBound && this.boundValue.isBoundVariable()) {
if (this.isBound && this.boundValue instanceof ProloGraalVariable) {
((ProloGraalVariable) this.boundValue).saveState();
}
}
......@@ -246,12 +246,14 @@ public final class ProloGraalVariable extends ProloGraalTerm<ProloGraalVariable>
* If the variable was previously bound to another variable, the state of this other variable is also restored.
*/
public void revertState() {
ProloGraalVariable previous = states.pop();
this.isBound = previous.isBound;
this.boundValue = previous.boundValue;
//System.out.println("Restored state " + this);
if (this.isBound && this.boundValue.isBoundVariable()) {
((ProloGraalVariable) this.boundValue).revertState();
if(!states.isEmpty()){
ProloGraalVariable previous = states.pop();
this.isBound = previous.isBound;
this.boundValue = previous.boundValue;
//System.out.println("Restored state " + this);
if (this.isBound && this.boundValue instanceof ProloGraalVariable) {
((ProloGraalVariable) this.boundValue).revertState();
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment