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 cb839fd4 authored by Tony Licata's avatar Tony Licata

Removed use of Java stack to resolve a query, can now run benchmark without...

Removed use of Java stack to resolve a query, can now run benchmark without stackoverflow exception.
Fixed </2 , >=/2 , ... predicates names (were '<'/2, '>='/2, ...)
parent ff7e921e
......@@ -45,7 +45,6 @@ public final class ProloGraalConsultBuiltin extends ProloGraalBuiltinClause {
ProloGraalTerm consultContentTerm = arg.getRootValue();
if(consultContentTerm instanceof ProloGraalAtom){
String filename = ((ProloGraalAtom) consultContentTerm).getName();
filename = filename.substring(1,filename.length()-1);
File loadedFile = new File(filename);
if(loadedFile.exists()) {
String fileContent;
......
......@@ -21,7 +21,7 @@ public final class ProloGraalEqualBuiltin extends ProloGraalBuiltinClause {
// create the head of this clause
// since we do not need custom unification, a simple structure is enough
ProloGraalStructure head = new ProloGraalStructure(getVariables());
head.setFunctor(new ProloGraalAtom(getVariables(), "'='"));
head.setFunctor(new ProloGraalAtom(getVariables(), "="));
// we create and store the variables to access them more easily later in the execute method
arg = new ProloGraalVariable(getVariables(), "A");
......
......@@ -21,7 +21,7 @@ public final class ProloGraalGEBuiltin extends ProloGraalBuiltinClause {
// create the head of this clause
// since we do not need custom unification, a simple structure is enough
ProloGraalStructure head = new ProloGraalStructure(getVariables());
head.setFunctor(new ProloGraalAtom(getVariables(), "'>='"));
head.setFunctor(new ProloGraalAtom(getVariables(), ">="));
// we create and store the variables to access them more easily later in the execute method
arg = new ProloGraalVariable(getVariables(), "A");
......
......@@ -26,7 +26,7 @@ public final class ProloGraalGTBuiltin extends ProloGraalBuiltinClause {
// create the head of this clause
// since we do not need custom unification, a simple structure is enough
ProloGraalStructure head = new ProloGraalStructure(getVariables());
head.setFunctor(new ProloGraalAtom(getVariables(), "'>'"));
head.setFunctor(new ProloGraalAtom(getVariables(), ">"));
// we create and store the variables to access them more easily later in the execute method
arg = new ProloGraalVariable(getVariables(), "A");
......
......@@ -21,7 +21,7 @@ public final class ProloGraalLEBuiltin extends ProloGraalBuiltinClause {
// create the head of this clause
// since we do not need custom unification, a simple structure is enough
ProloGraalStructure head = new ProloGraalStructure(getVariables());
head.setFunctor(new ProloGraalAtom(getVariables(), "'=<'"));
head.setFunctor(new ProloGraalAtom(getVariables(), "=<"));
// we create and store the variables to access them more easily later in the execute method
arg = new ProloGraalVariable(getVariables(), "A");
......
......@@ -21,7 +21,7 @@ public final class ProloGraalLTBuiltin extends ProloGraalBuiltinClause {
// create the head of this clause
// since we do not need custom unification, a simple structure is enough
ProloGraalStructure head = new ProloGraalStructure(getVariables());
head.setFunctor(new ProloGraalAtom(getVariables(), "'<'"));
head.setFunctor(new ProloGraalAtom(getVariables(), "<"));
// we create and store the variables to access them more easily later in the execute method
arg = new ProloGraalVariable(getVariables(), "A");
......
......@@ -20,7 +20,6 @@ public final class ProloGraalResolverNode extends RootNode {
private final ProloGraalContext context; // the context
private final Map<ProloGraalTerm<?>, List<ProloGraalClause>> clauses; // reference to the context clauses
private static final int FIRST_PROOF_TREE_NODE_DEPTH = 1;
public ProloGraalResolverNode(ProloGraalLanguage language) {
super(language);
......@@ -48,7 +47,7 @@ public final class ProloGraalResolverNode extends RootNode {
// also, the javadoc for the Stack encourages the use of a Deque instead
Deque<ProloGraalTerm<?>> goals = new ArrayDeque<>(clause.getGoals());
// create the root node of the proof tree
ProloGraalProofTreeNode proofTreeNode = new ProloGraalProofTreeNode(clauses, goals, FIRST_PROOF_TREE_NODE_DEPTH, context.isTraceFlag());
ProloGraalProofTreeNode proofTreeNode = new ProloGraalProofTreeNode(clauses, goals, context.isTraceFlag());
// start the execution of the proof tree, and stores the result
ProloGraalObject r = proofTreeNode.execute(branches);
if(r instanceof ProloGraalBoolean){
......
% This test checks the following things :
% - redo command
% - redo command with side-effects builtins
recommendedN(1000).
recommendedN(100000).
benchmark(0).
benchmark(N):-
is(N1,'-'(N,1)),
benchmark(N1),
benchmark(N1).
\ No newline at end of file
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