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

changed ProloGraalClauses into Truffle nodes, added ProloGraalGenericNode class.

changed ProloGraalBuiltinClauses into Truffle InstrumentableNodes, but builtins are still executed by java classic overriding.
changed ProloGraalIsBuiltin into specialized abstract class, now using ProloGraalIsBuiltinNodeGen.create to instantiate it (Truffle generated node).
created ProloGraalTypes class to allow new ProloGraal types into node specializations, currently WIP.
parent 127704e0
......@@ -3,7 +3,7 @@
<option name="MAIN_CLASS_NAME" value="ch.heiafr.prolograal.launcher.ProloGraalMain" />
<module name="launcher" />
<option name="PROGRAM_PARAMETERS" value="&quot;$ProjectFileDir$\code\language\tests\04_clauses.pl&quot;" />
<option name="VM_PARAMETERS" value="-Dtruffle.class.path.append=&quot;$ProjectFileDir$\code\language\target\prolograal-19.2.0.1-SNAPSHOT.jar;$ProjectFileDir$\code\antlr-4.7.1-complete.jar&quot;" />
<option name="VM_PARAMETERS" value="-Xmx2048m -Xms2048m -Dtruffle.class.path.append=&quot;$ProjectFileDir$\code\language\target\prolograal-20.1.0-SNAPSHOT.jar;$ProjectFileDir$\code\antlr-4.7.1-complete.jar&quot;" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="ch.heiafr.prolograal.launcher.*" />
......
......@@ -4,7 +4,7 @@
<parent>
<groupId>ch.heiafr</groupId>
<artifactId>prolograal-parent</artifactId>
<version>19.2.0.1-SNAPSHOT</version>
<version>20.1.0-SNAPSHOT</version>
</parent>
<artifactId>prolograal</artifactId>
<build>
......
......@@ -17,7 +17,6 @@ import com.oracle.truffle.api.source.SourceSection;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
......
package ch.heiafr.prolograal;
import ch.heiafr.prolograal.runtime.*;
import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.dsl.ImplicitCast;
import com.oracle.truffle.api.dsl.TypeCheck;
import com.oracle.truffle.api.dsl.TypeSystem;
/**
* Class defining the accepted types in the truffle DSL as NodeChild.
* @author Tony Licata
*/
@TypeSystem({int.class, double.class, boolean.class})
public abstract class ProloGraalTypes {
@TypeCheck(ProloGraalTerm.class)
public static boolean isProloGraalTerm(Object value) {
return value instanceof ProloGraalTerm;
}
@TypeCheck(ProloGraalBoolean.class)
public static boolean isProloGraalBoolean(Object value) {
return value instanceof ProloGraalBoolean;
}
@TypeCheck(ProloGraalObject.class)
public static boolean isProloGraalObject(Object value) {
return value instanceof ProloGraalObject;
}
/*
@ImplicitCast
public static ProloGraalTerm castVarToTerm(ProloGraalVariable value) {
return value;
}
@ImplicitCast
public static ProloGraalTerm castAtomToTerm(ProloGraalAtom value) {
return value;
}
@ImplicitCast
public static ProloGraalTerm castNumberToTerm(ProloGraalNumber value) {
return value;
}
@ImplicitCast
public static ProloGraalTerm castStructureToTerm(ProloGraalStructure value) {
return value;
}
*/
}
package ch.heiafr.prolograal.builtins.predicates;
import ch.heiafr.prolograal.runtime.ProloGraalBoolean;
import ch.heiafr.prolograal.runtime.ProloGraalClause;
import ch.heiafr.prolograal.runtime.ProloGraalRuntime;
import ch.heiafr.prolograal.runtime.ProloGraalSuccess;
import ch.heiafr.prolograal.ProloGraalTypes;
import ch.heiafr.prolograal.nodes.ProloGraalBuiltinHeadNode;
import ch.heiafr.prolograal.nodes.ProloGraalTermNode;
import ch.heiafr.prolograal.runtime.*;
import com.oracle.truffle.api.dsl.NodeChild;
import com.oracle.truffle.api.dsl.TypeSystemReference;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.instrumentation.GenerateWrapper;
import com.oracle.truffle.api.instrumentation.InstrumentableNode;
import com.oracle.truffle.api.instrumentation.ProbeNode;
import com.oracle.truffle.api.nodes.NodeInfo;
import java.util.HashMap;
import java.util.Map;
/**
* Abstract base class for built-ins.
......@@ -12,17 +22,36 @@ import ch.heiafr.prolograal.runtime.ProloGraalSuccess;
* @see ProloGraalRuntime
* @author Martin Spoto
*/
public abstract class ProloGraalBuiltinClause extends ProloGraalClause {
@TypeSystemReference(ProloGraalTypes.class)
@NodeInfo(shortName = "ProloGraalBuiltinClauseNode")
@GenerateWrapper
@NodeChild(value = "head", type = ProloGraalBuiltinHeadNode.class)
public abstract class ProloGraalBuiltinClause extends ProloGraalClause implements InstrumentableNode {
public ProloGraalBuiltinClause() {
super(new HashMap<>());
}
public ProloGraalBuiltinClause(Map<ProloGraalVariable, ProloGraalVariable> variables) {
super(variables);
}
public boolean isInstrumentable() {
return true;
}
public InstrumentableNode.WrapperNode createWrapper(ProbeNode probe) {
// ASTNodeWrapper is generated by @GenerateWrapper
return new ProloGraalBuiltinClauseWrapper(this, probe);
}
/**
* Overridable execute method for built-ins.
* May have side effects, like writing or opening a file.
*/
public ProloGraalBoolean execute(){
//default behaviour is to output a success
return new ProloGraalSuccess(getVariables());
}
public abstract ProloGraalBoolean executeBuiltin(VirtualFrame frame);
//public abstract ProloGraalObject executeGeneric(VirtualFrame frame);
/**
* We want the built-ins to override this because otherwise they will lose their "ProloGraalBultinClause" status.
......
......@@ -3,10 +3,12 @@ package ch.heiafr.prolograal.builtins.predicates;
import ch.heiafr.prolograal.ProloGraalLanguage;
import ch.heiafr.prolograal.parser.ProloGraalParserImpl;
import ch.heiafr.prolograal.runtime.*;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.source.Source;
import java.io.File;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.util.HashMap;
import java.util.List;
import java.util.stream.Collectors;
......@@ -22,7 +24,7 @@ public final class ProloGraalConsultBuiltin extends ProloGraalBuiltinClause {
private ProloGraalVariable arg; //The variable A in consult(A). We keep it to use it in the execute method
public ProloGraalConsultBuiltin(ProloGraalContext context) {
super();
super(new HashMap<>());
// get printer from context
this.context = context;
......@@ -41,7 +43,7 @@ public final class ProloGraalConsultBuiltin extends ProloGraalBuiltinClause {
* Consult the filename present in arg variable.
*/
@Override
public ProloGraalBoolean execute() {
public ProloGraalBoolean executeBuiltin(VirtualFrame frame) {
ProloGraalTerm consultContentTerm = arg.getRootValue();
if(consultContentTerm instanceof ProloGraalAtom){
String filename = ((ProloGraalAtom) consultContentTerm).getName();
......
......@@ -3,7 +3,10 @@ package ch.heiafr.prolograal.builtins.predicates;
import ch.heiafr.prolograal.ProloGraalLanguage;
import ch.heiafr.prolograal.parser.ProloGraalParserImpl;
import ch.heiafr.prolograal.runtime.*;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.source.Source;
import java.util.HashMap;
import java.util.List;
import java.util.stream.Collectors;
......@@ -19,7 +22,7 @@ public final class ProloGraalConsultStringBuiltin extends ProloGraalBuiltinClaus
private ProloGraalVariable arg; //The variable A in consult(A). We keep it to use it in the execute method
public ProloGraalConsultStringBuiltin(ProloGraalContext context) {
super();
super(new HashMap<>());
// get printer from context
this.context = context;
......@@ -38,7 +41,7 @@ public final class ProloGraalConsultStringBuiltin extends ProloGraalBuiltinClaus
* Consult the clauses string present in arg variable.
*/
@Override
public ProloGraalBoolean execute() {
public ProloGraalBoolean executeBuiltin(VirtualFrame frame) {
ProloGraalTerm consultContentTerm = arg.getRootValue();
if(consultContentTerm instanceof ProloGraalAtom){
String consultContentString = ((ProloGraalAtom) consultContentTerm).getName();
......
package ch.heiafr.prolograal.builtins.predicates;
import ch.heiafr.prolograal.runtime.*;
import com.oracle.truffle.api.frame.VirtualFrame;
import java.util.HashMap;
/**
* Class representing the '='(A,B) predicate.
......@@ -15,7 +18,7 @@ public final class ProloGraalEqualBuiltin extends ProloGraalBuiltinClause {
private ProloGraalVariable arg2; // the variable B in is(A,B). We keep it to use it in the execute method
public ProloGraalEqualBuiltin(ProloGraalContext context) {
super();
super(new HashMap<>());
this.context = context;
// create the head of this clause
......@@ -37,7 +40,7 @@ public final class ProloGraalEqualBuiltin extends ProloGraalBuiltinClause {
* Execute the '='/2 predicate, returning success if a part can be unified with the other one
*/
@Override
public ProloGraalBoolean execute() {
public ProloGraalBoolean executeBuiltin(VirtualFrame frame) {
return arg.unify(arg2)||arg2.unify(arg)?new ProloGraalSuccess(getVariables()):new ProloGraalFailure();
}
......
package ch.heiafr.prolograal.builtins.predicates;
import ch.heiafr.prolograal.runtime.*;
import com.oracle.truffle.api.frame.VirtualFrame;
import java.util.HashMap;
/**
* Class representing the '>='(A,B) predicate.
......@@ -15,7 +18,7 @@ public final class ProloGraalGEBuiltin extends ProloGraalBuiltinClause {
private ProloGraalVariable arg2; // the variable B in is(A,B). We keep it to use it in the execute method
public ProloGraalGEBuiltin(ProloGraalContext context) {
super();
super(new HashMap<>());
this.context = context;
// create the head of this clause
......@@ -37,7 +40,7 @@ public final class ProloGraalGEBuiltin extends ProloGraalBuiltinClause {
* Execute the '>='/2 predicate, returning success if left part is greater or equal right part
*/
@Override
public ProloGraalBoolean execute() {
public ProloGraalBoolean executeBuiltin(VirtualFrame frame) {
if(arg.isNumber() && arg2.isNumber())
if(arg.asNumber().asDouble() >= arg2.asNumber().asDouble())return new ProloGraalSuccess(getVariables());
return new ProloGraalFailure();
......
package ch.heiafr.prolograal.builtins.predicates;
import ch.heiafr.prolograal.runtime.*;
import com.oracle.truffle.api.frame.VirtualFrame;
import java.io.PrintWriter;
import java.util.HashMap;
......@@ -20,7 +21,7 @@ public final class ProloGraalGTBuiltin extends ProloGraalBuiltinClause {
private ProloGraalVariable arg2; // the variable B in is(A,B). We keep it to use it in the execute method
public ProloGraalGTBuiltin(ProloGraalContext context) {
super();
super(new HashMap<>());
this.context = context;
// create the head of this clause
......@@ -42,7 +43,7 @@ public final class ProloGraalGTBuiltin extends ProloGraalBuiltinClause {
* Execute the '>'/2 predicate, returning success if left part is greater than right part
*/
@Override
public ProloGraalBoolean execute() {
public ProloGraalBoolean executeBuiltin(VirtualFrame frame) {
if(arg.isNumber() && arg2.isNumber())
if(arg.asNumber().asDouble() > arg2.asNumber().asDouble())return new ProloGraalSuccess(getVariables());
return new ProloGraalFailure();
......
package ch.heiafr.prolograal.builtins.predicates;
import ch.heiafr.prolograal.builtins.ProloGraalIsOperators;
import ch.heiafr.prolograal.nodes.ProloGraalBuiltinHeadNode;
import ch.heiafr.prolograal.nodes.ProloGraalIsHeadNode;
import ch.heiafr.prolograal.runtime.*;
import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.dsl.NodeChild;
import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.nodes.NodeInfo;
import com.oracle.truffle.api.nodes.NodeUtil;
import java.io.PrintWriter;
import java.util.*;
import java.util.function.Function;
......@@ -17,7 +19,8 @@ import java.util.function.Function;
* @author Licata Tony
* @see ProloGraalBuiltinClause
*/
public class ProloGraalIsBuiltin extends ProloGraalBuiltinClause {
@NodeInfo(shortName = "ProloGraalIsBuiltinNode")
public abstract class ProloGraalIsBuiltin extends ProloGraalBuiltinClause {
private final ProloGraalContext context; // we keep the context for the copy method
ProloGraalVariable arg; // the variable A in is(A,B). We keep it to use it in the execute method
......@@ -28,7 +31,7 @@ public class ProloGraalIsBuiltin extends ProloGraalBuiltinClause {
private static final Map<ProloGraalAtom, Function<List<ProloGraalNumber>,ProloGraalNumber>> operations = ProloGraalIsOperators.getOperationsMap();
public ProloGraalIsBuiltin(ProloGraalContext context) {
super();
super(new HashMap<>());
this.context = context;
// create the head of this clause
......@@ -46,18 +49,31 @@ public class ProloGraalIsBuiltin extends ProloGraalBuiltinClause {
setHead(head);
}
public ProloGraalBoolean executeFastPath() {
protected ProloGraalBoolean executeFastPath(VirtualFrame frame) {
if(arg.unify(arg2))
return new ProloGraalSuccess(getVariables());
return new ProloGraalFailure();
}
@Specialization
public ProloGraalBoolean returnHead(VirtualFrame frame, ProloGraalBoolean head){
return head;
/*
List<ProloGraalTerm<?>> headArgs = ((ProloGraalStructure) head).getArguments();
return headArgs.get(0).unify(headArgs.get(1))?new ProloGraalSuccess(getVariables()):new ProloGraalFailure();*/
}
/**
* Execute the is/2 predicate, unifying the left variable with the result
*/
/*
@Override
public ProloGraalBoolean execute() {
public ProloGraalBoolean executeBuiltin(VirtualFrame frame) {
return initExecute();
}*/
private ProloGraalBoolean initExecute(){
ProloGraalTerm leftTerm = arg.getRootValue();
ProloGraalTerm rightTerm = arg2.getRootValue();
if(leftTerm.isVariable() || leftTerm.isNumber()){
......@@ -110,6 +126,13 @@ public class ProloGraalIsBuiltin extends ProloGraalBuiltinClause {
// override the default copy so we do not lose the built-in status
@Override
public ProloGraalClause copy() {
return new ProloGraalIsBuiltin(context);
List<Node> childrens = NodeUtil.findNodeChildren(this);
return ProloGraalIsBuiltinNodeGen.create(context, (ProloGraalBuiltinHeadNode)NodeUtil.cloneNode(childrens.get(0)));
}
// override getHead method to handle AST node head
@Override
public ProloGraalTerm<?> getHead(){
return ((ProloGraalIsHeadNode)NodeUtil.findNodeChildren(this).get(0)).getValue();
}
}
package ch.heiafr.prolograal.builtins.predicates;
import ch.heiafr.prolograal.runtime.*;
import com.oracle.truffle.api.frame.VirtualFrame;
import java.util.HashMap;
/**
* Class representing the '=<'(A,B) predicate.
......@@ -15,7 +18,7 @@ public final class ProloGraalLEBuiltin extends ProloGraalBuiltinClause {
private ProloGraalVariable arg2; // the variable B in is(A,B). We keep it to use it in the execute method
public ProloGraalLEBuiltin(ProloGraalContext context) {
super();
super(new HashMap<>());
this.context = context;
// create the head of this clause
......@@ -37,7 +40,7 @@ public final class ProloGraalLEBuiltin extends ProloGraalBuiltinClause {
* Execute the '=<'/2 predicate, returning success if left part is less or equal right part
*/
@Override
public ProloGraalBoolean execute() {
public ProloGraalBoolean executeBuiltin(VirtualFrame frame) {
if(arg.isNumber() && arg2.isNumber())
if(arg.asNumber().asDouble() <= arg2.asNumber().asDouble())return new ProloGraalSuccess(getVariables());
return new ProloGraalFailure();
......
package ch.heiafr.prolograal.builtins.predicates;
import ch.heiafr.prolograal.runtime.*;
import com.oracle.truffle.api.frame.VirtualFrame;
import java.util.HashMap;
/**
* Class representing the '<'(A,B) predicate.
......@@ -15,7 +18,7 @@ public final class ProloGraalLTBuiltin extends ProloGraalBuiltinClause {
private ProloGraalVariable arg2; // the variable B in is(A,B). We keep it to use it in the execute method
public ProloGraalLTBuiltin(ProloGraalContext context) {
super();
super(new HashMap<>());
this.context = context;
// create the head of this clause
......@@ -37,7 +40,7 @@ public final class ProloGraalLTBuiltin extends ProloGraalBuiltinClause {
* Execute the '<'/2 predicate, returning success if left part is less than right part
*/
@Override
public ProloGraalBoolean execute() {
public ProloGraalBoolean executeBuiltin(VirtualFrame frame) {
if(arg.isNumber() && arg2.isNumber())
if(arg.asNumber().asDouble() < arg2.asNumber().asDouble())return new ProloGraalSuccess(getVariables());
return new ProloGraalFailure();
......
package ch.heiafr.prolograal.builtins.predicates;
import ch.heiafr.prolograal.runtime.*;
import com.oracle.truffle.api.frame.VirtualFrame;
import java.io.PrintWriter;
import java.util.HashMap;
/**
* Class representing the trace/0 predicate.
......@@ -16,7 +19,7 @@ public final class ProloGraalNotraceBuiltin extends ProloGraalBuiltinClause {
private static final String TRACE_OFF_TEXT = "The debugger is switched off\n";
public ProloGraalNotraceBuiltin(ProloGraalContext context) {
super();
super(new HashMap<>());
// get printer from context
this.writer = new PrintWriter(context.getOutput(), true);
this.context = context;
......@@ -32,7 +35,7 @@ public final class ProloGraalNotraceBuiltin extends ProloGraalBuiltinClause {
* Execute the notrace, even if the trace is already OFF (like usual Prolog interpreter).
*/
@Override
public ProloGraalBoolean execute() {
public ProloGraalBoolean executeBuiltin(VirtualFrame frame) {
context.setTraceFlag(false);
writer.print(TRACE_OFF_TEXT);
writer.flush();
......
package ch.heiafr.prolograal.builtins.predicates;
import ch.heiafr.prolograal.runtime.*;
import com.oracle.truffle.api.frame.VirtualFrame;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
......@@ -17,7 +19,7 @@ public final class ProloGraalRealTimeBuiltin extends ProloGraalBuiltinClause {
private ProloGraalVariable arg; // the variable A in real_time(A). We keep it to use it in the execute method
public ProloGraalRealTimeBuiltin() {
super();
super(new HashMap<>());
// create the head of this clause
// since we do not need custom unification, a simple structure is enough
......@@ -32,7 +34,7 @@ public final class ProloGraalRealTimeBuiltin extends ProloGraalBuiltinClause {
}
@Override
public ProloGraalBoolean execute(){
public ProloGraalBoolean executeBuiltin(VirtualFrame frame){
if(arg.isNumber() || arg.isBound() && arg.getRootValue().isVariable())
if(arg.unify(new ProloGraalDoubleNumber(getVariables(),System.currentTimeMillis()-startTime)))
return new ProloGraalSuccess(getVariables());
......
package ch.heiafr.prolograal.builtins.predicates;
import ch.heiafr.prolograal.runtime.*;
import com.oracle.truffle.api.frame.VirtualFrame;
import java.io.PrintWriter;
import java.util.HashMap;
/**
* Class representing the trace/0 predicate.
......@@ -16,7 +19,7 @@ public final class ProloGraalTraceBuiltin extends ProloGraalBuiltinClause {
private static final String TRACE_ON_TEXT = "The debugger will first creep -- showing everything (trace)";
public ProloGraalTraceBuiltin(ProloGraalContext context) {
super();
super(new HashMap<>());
// get printer from context
this.writer = new PrintWriter(context.getOutput(), true);
this.context = context;
......@@ -32,7 +35,7 @@ public final class ProloGraalTraceBuiltin extends ProloGraalBuiltinClause {
* Execute the trace, even if the trace is already ON (like usual Prolog behaviour).
*/
@Override
public ProloGraalBoolean execute() {
public ProloGraalBoolean executeBuiltin(VirtualFrame frame) {
context.setTraceFlag(true);
writer.print(TRACE_ON_TEXT);
writer.flush();
......
......@@ -2,6 +2,9 @@ package ch.heiafr.prolograal.builtins.predicates;
import ch.heiafr.prolograal.runtime.*;
import com.oracle.truffle.api.Truffle;
import com.oracle.truffle.api.frame.VirtualFrame;
import java.util.HashMap;
/**
* Class representing the useinterpreter/0 predicate.
......@@ -14,7 +17,7 @@ public final class ProloGraalUseInterpreterBuiltin extends ProloGraalBuiltinClau
private final ProloGraalContext context; // we keep the context for the copy method
public ProloGraalUseInterpreterBuiltin(ProloGraalContext context) {
super();
super(new HashMap<>());
// get printer from context
this.context = context;
......@@ -29,7 +32,7 @@ public final class ProloGraalUseInterpreterBuiltin extends ProloGraalBuiltinClau
* Launch an interpreter
*/
@Override
public ProloGraalBoolean execute() {
public ProloGraalBoolean executeBuiltin(VirtualFrame frame) {
Truffle.getRuntime().createCallTarget(context.getInterpreterNode()).call();
return new ProloGraalSuccess(getVariables());
}
......
package ch.heiafr.prolograal.builtins.predicates;
import ch.heiafr.prolograal.runtime.*;
import com.oracle.truffle.api.frame.VirtualFrame;
import java.util.HashMap;
import java.util.Map;
/**
......@@ -50,12 +52,17 @@ public final class ProloGraalVarBuiltin extends ProloGraalBuiltinClause {
}
public ProloGraalVarBuiltin() {
super();
super(new HashMap<>());
// creates our custom head and set it
VarPredicateHead head = new VarPredicateHead(getVariables());
setHead(head);
}
@Override
public ProloGraalBoolean executeBuiltin(VirtualFrame frame){
return new ProloGraalSuccess(getVariables());
}
// override the default copy so we do not lose the custom head
@Override
public ProloGraalClause copy() {
......
package ch.heiafr.prolograal.builtins.predicates;
import ch.heiafr.prolograal.runtime.*;
import com.oracle.truffle.api.frame.VirtualFrame;
import java.io.PrintWriter;
import java.util.HashMap;
/**
* Class representing the write/1(X) predicate.
......@@ -17,7 +19,7 @@ public final class ProloGraalWriteBuiltin extends ProloGraalBuiltinClause {
private ProloGraalVariable arg; // the variable X in write(X). We keep it to print it after the unification process
public ProloGraalWriteBuiltin(ProloGraalContext context) {
super();
super(new HashMap<>());
// get printer from context
this.writer = new PrintWriter(context.getOutput(), true);
this.context = context;
......@@ -36,7 +38,7 @@ public final class ProloGraalWriteBuiltin extends ProloGraalBuiltinClause {
* Execute the write, printing the string representation of whatever the variable is currently bound to.
*/
@Override
public ProloGraalBoolean execute() {
public ProloGraalBoolean executeBuiltin(VirtualFrame frame) {
String str = arg.getRootValue().toString();
if(str.startsWith("'") && str.endsWith("'")) {
// strip single quotes
......
package ch.heiafr.prolograal.nodes;
import ch.heiafr.prolograal.runtime.ProloGraalTerm;
import com.oracle.truffle.api.dsl.NodeChild;
import com.oracle.truffle.api.nodes.NodeInfo;
@NodeInfo(shortName = "ProloGraalBinaryHeadNode")
@NodeChild(value = "left", type = ProloGraalTermNode.class)
@NodeChild(value = "right", type = ProloGraalTermNode.class)
public abstract class ProloGraalBinaryHeadNode extends ProloGraalBuiltinHeadNode {
public ProloGraalBinaryHeadNode(ProloGraalTerm<?> value) {
super(value);
}
}
package ch.heiafr.prolograal.nodes;
import ch.heiafr.prolograal.ProloGraalTypes;
import ch.heiafr.prolograal.runtime.*;
import com.oracle.truffle.api.dsl.TypeSystemReference;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.instrumentation.GenerateWrapper;
import com.oracle.truffle.api.instrumentation.InstrumentableNode;
import com.oracle.truffle.api.instrumentation.ProbeNode;