Questions tagged [codegen]

Use codegen for questions related to language features or tools which facilitate translating code between languages or creating code from metadata

References

161 questions
3
votes
3 answers

How do I write slick table definitions with nullable columns?

This table definition worked until I realized that having nullable columns meant that I needed to use Option[String] instead of just String. That was the only change I made and this is what my code looks like now. class RespondentTableDef(tag: Tag)…
B Roy Dawson
  • 503
  • 1
  • 5
  • 16
3
votes
0 answers

Sympy - generate fortran code with one dimensional array

I was trying to use sympy - codegen to get a fortran code. It works fine except for one annoying thing for which I can`t find a solution. I simplified my example to this: bar = Matrix([x*x,y*z,z*y]) result = codegen(('foo', bar), 'f95',…
MatG
  • 31
  • 1
3
votes
2 answers

How to use sympy codegen with expressions that contain implemented functions

Im trying to compile an expression that contains an UndefinedFunction which has an implementation provided. (Alternatively: an expression which contains a Symbol which represents a call to an external numerical function) Is there a way to do this?…
PeterE
  • 5,101
  • 4
  • 21
  • 46
3
votes
1 answer

LLVM Backend : Replacing indirect jmps for x86 backend

I want to replace indirect jmp *(eax) instructions in the code to mov *(eax),ebx; jmp *ebx for the x86 executables. Before implementing this, i would like to make LLVM compiler, log an output every time it detects a jmp *(eax) instruction by adding…
woodstok
  • 2,354
  • 3
  • 28
  • 45
3
votes
1 answer

How to generate Fortran subroutine with SymPy codegen

I want to generate a Fortran subroutine with SymPy codegen utility. I can generate a Fortran function without problem with codegen(("f", x*y*z), "f95", "filename"). But I want to generate a Fortran subroutine so I can modify input arrays. How can I…
Michael
  • 1,394
  • 2
  • 16
  • 30
3
votes
1 answer

Matlab Coder - Alternative for strcat function

Currently matlab coder is not supporting strcat or strjoin. Is there any anyway to circumvent this or custom function? Edit: Input= [a b c d] Expected output= 'a,b,c,d'
Joel
  • 1,520
  • 1
  • 16
  • 27
3
votes
1 answer

jOOQ Converter expression for single column in table

I have a custom EnumConverter setup and I want to use it only for a single column in a specific table to generate the POJOs. foo.bar.MyTableStatus mytable.status I've tried…
Eldelshell
  • 5,729
  • 7
  • 39
  • 59
2
votes
3 answers

java peephole optimization beginner compilers

As part of a group project I'm writing a compiler for a simplified language. As one of the optional features I thought I'd add a peephole optimizer to go over the codegen's output intel assembly code and optimize it. Our compiler is done in java…
ddriver1
  • 703
  • 9
  • 16
2
votes
1 answer

JiBX Code-Gen Error: Duplicate name on format element at

I am trying to generate code (with customizations applied) for OTA schema available at [OTA2003B] ( http://www.opentravel.org/Specifications/SchemaIndex.aspx?FolderName=2003B ) using JiBX Code Gen tool.Following is the code I have written to achieve…
Jignesh Gohel
  • 5,425
  • 4
  • 46
  • 82
2
votes
1 answer

Why are the "Paste JSON As Classes" and "Paste XML As Classes" commands disabled (grayed out) in Visual Studio?

I'm using Visual Studio 2017 15.9.0 Preview 4.0. I'm trying to use the "Paste XML As Classes" command available under "Edit > Paste Special" but it's grayed out: I got the (incorrect) feeling that this command would allow me to pick a file that…
rory.ap
  • 31,183
  • 9
  • 64
  • 147
2
votes
1 answer

How to make Core Data generated code to use internal accessors? Swift 4, Xcode 9.2

I am wondering if there is any way to prevent core data from generating public classes from core data model Entities. Currently it generates classes like this: import Foundation import CoreData public class MyEntityMO: NSManagedObject…
2
votes
0 answers

How to integrate code-gen into a python package

I'm just now branching out into python packaging after using proprietary packaging methods for over a decade. I have a data file that is used to generate python code that is a part of my package that runs on Windows and Linux. I'm trying to…
Ed Page
  • 46
  • 2
2
votes
1 answer

JOOQ generated classes have schema defaulted to PUBLIC

This is a follow up question to this SO Question. I am using jooq codegen for auto generation of jooq classes from jpa entities. I am planning to use jooq as a SQL query builder and execute the actual queries with JPA EntityManager. But jooq is…
yaswanth
  • 1,914
  • 1
  • 15
  • 28
2
votes
1 answer

How do I restrict the generated code to tables in a database?

I am currently evaluating jooq. I am very new to it. I want to use jooq to access a SQL Server 2008 R2 database. When I generate the classes, the codegen tool goes and generates code for objects from all the databases on that server which is not…
costa
  • 3,261
  • 2
  • 29
  • 46
2
votes
0 answers

How to cancel request generated by Swagger Codegen

I am generating a lib with Swagger-codegen. The library I used was Volley. It doesn't seem the generated code has any way to cancel a request. Is there anyway to cancel the request through the generated code? As our api spec may change between each…
jarly
  • 211
  • 1
  • 4
  • 15
1 2
3
10 11