java.lang.Object
java.lang.Record
org.aya.core.term.IntegerTerm
- All Implemented Interfaces:
Callable,Callable.Common,Callable.Tele,ConCallLike,StableWHNF,Term,AyaDocile,Shaped<Term>,Shaped.Inductive<Term>,Shaped.Nat<Term>,org.aya.guest0x0.cubical.Restr.TermLike<Term>
public record IntegerTerm(int repr, @NotNull ShapeRecognition recognition, @NotNull DataCall type)
extends Record
implements StableWHNF, Shaped.Nat<Term>, ConCallLike
An efficient represent for Nat
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.aya.core.term.Callable
Callable.Common, Callable.Factory<D extends Def,S extends Decl>, Callable.Tele Nested classes/interfaces inherited from interface org.aya.core.term.ConCallLike
ConCallLike.HeadNested classes/interfaces inherited from interface org.aya.guest0x0.cubical.Restr.TermLike
org.aya.guest0x0.cubical.Restr.TermLike.Factory<T>Nested classes/interfaces inherited from interface org.aya.generic.Shaped
Shaped.Applicable<T extends AyaDocile,Core extends Def, Concrete extends TeleDecl<?>>, Shaped.Inductive<T>, Shaped.List<T extends AyaDocile>, Shaped.Nat<T extends AyaDocile> Nested classes/interfaces inherited from interface org.aya.core.term.Term
Term.Matching, Term.Param -
Constructor Summary
ConstructorsConstructorDescriptionIntegerTerm(int repr, @NotNull ShapeRecognition recognition, @NotNull DataCall type) Creates an instance of aIntegerTermrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>>conArgs()@NotNull Term@NotNull IntegerTermdescent(@NotNull UnaryOperator<Term> f, @NotNull UnaryOperator<Pat> g) Descending an operation to the term AST.@NotNull Termdestruct(int repr) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.head()@NotNull Term@NotNull Term@NotNull IntegerTermmap(@NotNull IntUnaryOperator f) @NotNull ShapeRecognitionReturns the value of therecognitionrecord component.intrepr()Returns the value of thereprrecord component.final StringtoString()Returns a string representation of this record class.@NotNull DataCalltype()Returns the value of thetyperecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.aya.generic.AyaDocile
debuggerOnlyToDocMethods inherited from interface org.aya.core.term.ConCallLike
args, ref, uliftMethods inherited from interface org.aya.guest0x0.cubical.Restr.TermLike
asFormulaMethods inherited from interface org.aya.generic.Shaped.Inductive
compareShape, ctorRefMethods inherited from interface org.aya.generic.Shaped.Nat
compareUntypedMethods inherited from interface org.aya.core.term.Term
computeType, findUsages, freezeHoles, lift, normalize, rename, scopeCheck, subst, subst, subst, subst, toDoc
-
Constructor Details
-
IntegerTerm
public IntegerTerm(int repr, @NotNull @NotNull ShapeRecognition recognition, @NotNull @NotNull DataCall type) Creates an instance of aIntegerTermrecord class.- Parameters:
repr- the value for thereprrecord componentrecognition- the value for therecognitionrecord componenttype- the value for thetyperecord component
-
-
Method Details
-
head
- Specified by:
headin interfaceConCallLike
-
conArgs
- Specified by:
conArgsin interfaceConCallLike
-
descent
@NotNull public @NotNull IntegerTerm descent(@NotNull @NotNull UnaryOperator<Term> f, @NotNull @NotNull UnaryOperator<Pat> g) Description copied from interface:TermDescending an operation to the term AST. NOTE: Currently we require the operation `f` to preserve:,invalid @link
StructCallDataCall,SortTerm,Shaped.Applicable. -
constructorForm
- Specified by:
constructorFormin interfaceShaped.Inductive<Term>- Specified by:
constructorFormin interfaceShaped.Nat<Term>
-
makeZero
- Specified by:
makeZeroin interfaceShaped.Nat<Term>
-
makeSuc
@NotNull public @NotNull Term makeSuc(@NotNull @NotNull CtorDef suc, @NotNull @NotNull org.aya.util.Arg<Term> term) - Specified by:
makeSucin interfaceShaped.Nat<Term>
-
destruct
- Specified by:
destructin interfaceShaped.Nat<Term>
-
map
- Specified by:
mapin interfaceShaped.Nat<Term>
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
repr
public int repr()Returns the value of thereprrecord component.- Specified by:
reprin interfaceShaped.Nat<Term>- Returns:
- the value of the
reprrecord component
-
recognition
Returns the value of therecognitionrecord component.- Specified by:
recognitionin interfaceShaped.Inductive<Term>- Returns:
- the value of the
recognitionrecord component
-
type
Returns the value of thetyperecord component.
-