All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gapt.formats.tip.compiler.package.scala Maven / Gradle / Ivy

The newest version!
package gapt.formats.tip

import gapt.expr.ty.TBase
import gapt.formats.tip.parser.TipSmtDatatype
import gapt.proofs.context.update.InductiveType

package object compiler {
  def tipSmtDatatypeToInductiveType(datatype: TipSmtDatatype): InductiveType = {
    val constructorDefinitions = datatype.constructors.map {
      c =>
        c.name -> c.fields.map {
          f =>
            Some(f.name) -> TBase(f.typ.typename)
        }
    }
    InductiveType(datatype.name, Nil, constructorDefinitions: _*)
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy