java.lang.Object
java.lang.Record
org.aya.core.term.RuleReducer.Con
- All Implemented Interfaces:
Callable,Callable.Common,Callable.Tele,ConCallLike,RuleReducer,Term,AyaDocile,org.aya.guest0x0.cubical.Restr.TermLike<Term>
- Enclosing interface:
RuleReducer
public static record RuleReducer.Con(Shaped.Applicable<Term,CtorDef,TeleDecl.DataCtor> rule, int ulift, @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>> dataArgs, @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>> conArgs)
extends Record
implements RuleReducer, ConCallLike
A special
ConCall which can be reduced to something interesting.-
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.core.term.RuleReducer
RuleReducer.Con, RuleReducer.FnNested classes/interfaces inherited from interface org.aya.core.term.Term
Term.Matching, Term.Param -
Constructor Summary
ConstructorsConstructorDescriptionCon(Shaped.Applicable<Term, CtorDef, TeleDecl.DataCtor> rule, int ulift, @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>> dataArgs, @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>> conArgs) Creates an instance of aConrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>>conArgs()Returns the value of theconArgsrecord component.@NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>>dataArgs()Returns the value of thedataArgsrecord component.@NotNull Termdescent(@NotNull UnaryOperator<Term> f, @NotNull UnaryOperator<Pat> g) Descending an operation to the term AST.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.head()rule()Returns the value of therulerecord component.final StringtoString()Returns a string representation of this record class.intulift()Returns the value of theuliftrecord component.update(@NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>> dataArgs, @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>> conArgs) 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, refMethods inherited from interface org.aya.guest0x0.cubical.Restr.TermLike
asFormulaMethods inherited from interface org.aya.core.term.Term
computeType, findUsages, freezeHoles, lift, normalize, rename, scopeCheck, subst, subst, subst, subst, toDoc
-
Constructor Details
-
Con
public Con(@NotNull Shaped.Applicable<Term, CtorDef, TeleDecl.DataCtor> rule, int ulift, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>> dataArgs, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>> conArgs) Creates an instance of aConrecord class.- Parameters:
rule- the value for therulerecord componentulift- the value for theuliftrecord componentdataArgs- the value for thedataArgsrecord componentconArgs- the value for theconArgsrecord component
-
-
Method Details
-
head
- Specified by:
headin interfaceConCallLike
-
update
@NotNull public RuleReducer.Con update(@NotNull @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>> dataArgs, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<org.aya.util.Arg<Term>> conArgs) -
descent
@NotNull public @NotNull Term 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. -
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 '=='. -
rule
Returns the value of therulerecord component.- Specified by:
rulein interfaceRuleReducer- Returns:
- the value of the
rulerecord component
-
ulift
public int ulift()Returns the value of theuliftrecord component.- Specified by:
uliftin interfaceCallable.Common- Specified by:
uliftin interfaceCallable.Tele- Specified by:
uliftin interfaceConCallLike- Returns:
- the value of the
uliftrecord component
-
dataArgs
Returns the value of thedataArgsrecord component.- Returns:
- the value of the
dataArgsrecord component
-
conArgs
Returns the value of theconArgsrecord component.- Specified by:
conArgsin interfaceConCallLike- Returns:
- the value of the
conArgsrecord component
-