Package edu.cornell.cs.apl.viaduct.passes

Types

MuxPostprocessor
Link copied to clipboard
class MuxPostprocessor(containedProtocolCheck: (Protocol) -> Boolean, selection: ProtocolAssignment) : ProgramPostprocessor
ProgramPostprocessor
Link copied to clipboard
interface ProgramPostprocessor
ProgramPostprocessorRegistry
Link copied to clipboard
class ProgramPostprocessorRegistry(postprocessors: List<ProgramPostprocessor>) : ProgramPostprocessor

Functions

annotateWithProtocols
Link copied to clipboard
fun ProgramNode.annotateWithProtocols(assignment: ProtocolAssignment): ProgramNode

Annotate parameters, declarations, and let nodes with protocols.

canMux
Link copied to clipboard
fun StatementNode.canMux(): Boolean
check
Link copied to clipboard
fun ProgramNode.check()

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

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

Compile this source file to a Kotlin program.

elaborated
Link copied to clipboard
fun ProgramNode.elaborated(): ProgramNode

Elaborates this surface program into a program in the intermediate representation.

isAssignmentAnnotated
Link copied to clipboard
fun ProgramNode.isAssignmentAnnotated(): Boolean
specialize
Link copied to clipboard
fun ProgramNode.specialize(): ProgramNode

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.