Package edu.cornell.cs.apl.viaduct.passes
Types
MuxPostprocessor
Link copied to clipboard
class MuxPostprocessor(containedProtocolCheck: (Protocol) -> Boolean, selection: ProtocolAssignment) : ProgramPostprocessor
Content copied to clipboard
ProgramPostprocessor
Link copied to clipboard
ProgramPostprocessorRegistry
Link copied to clipboard
class ProgramPostprocessorRegistry(postprocessors: List<ProgramPostprocessor>) : ProgramPostprocessor
Content copied to clipboard
Functions
annotateWithProtocols
Link copied to clipboard
fun ProgramNode.annotateWithProtocols(assignment: ProtocolAssignment): ProgramNode
Content copied to clipboard
Annotate parameters, declarations, and let nodes with protocols.
canMux
Link copied to clipboard
check
Link copied to clipboard
Performs all static checks on this program.
compile
Link copied to clipboard
fun SourceFile.compile(backend: Backend, costRegime: SimpleCostRegime = SimpleCostRegime.WAN, saveLabelConstraintGraph: (graphWriter: (Writer) -> Unit) -> Unit? = null, saveInferredLabels: File? = null, saveEstimatedCost: File? = null, saveProtocolAssignment: File? = null): ProgramNode
Content copied to clipboard
Similar to SourceFile.compileToKotlin, but returns a program for the interpreter.
compileToKotlin
Link copied to clipboard
fun SourceFile.compileToKotlin(fileName: String, packageName: String, backend: Backend, costRegime: SimpleCostRegime = SimpleCostRegime.WAN, saveLabelConstraintGraph: (graphWriter: (Writer) -> Unit) -> Unit? = null, saveInferredLabels: File? = null, saveEstimatedCost: File? = null, saveProtocolAssignment: File? = null): FileSpec
Content copied to clipboard
Compile this source file to a Kotlin program.
elaborated
Link copied to clipboard
Elaborates this surface program into a program in the intermediate representation.
isAssignmentAnnotated
Link copied to clipboard
specialize
Link copied to clipboard
Returns an AST where every call site is specialized into new functions as much as possible. This allows for the most liberal protocol selection possible, at the cost of redundancy. The specializer will not specialize (mutually) recursive functions to prevent unbounded specialization.