Questions tagged [elaboration]
14 questions
24
votes
2 answers
When to use Pragma Pure/Preelaborate
Is there a set of general rules/guidelines that can help to understand when to prefer pragma Pure, pragma Preelaborate, or something else entirely? The rules and definitions presented in the standard (Ada 2012), are a little heavy-going and I'd be…

Anthony
- 12,177
- 9
- 69
- 105
22
votes
1 answer
Finding out which metas are unsolved in an Agda program
What's the best way to find out what's causing unsolved metas? Is there a way to turn all unsolved metas (and only the unsolved ones) into holes, by expanding all the surrounding wildcards that are solvable?
If nothing else, does changing an…

Cactus
- 27,075
- 9
- 69
- 149
4
votes
0 answers
How to use absurd/void in idris elaboration
I am writing a trivial function in idris :
f : (a:Nat) -> (b:Nat) -> (k:(Z=(S Z))) -> (a=b)
f a b k = absurd k --- this works
Now I want to write it using elaboration :
f : (a:Nat) -> (b:Nat) -> (k:(Z=(S Z))) -> (a=b)
f = %runElab (do
intro' --…

RKS
- 309
- 1
- 6
3
votes
4 answers
Why use 'struct' keyword in class pointer declaration in C++
When and why should we use the 'struct' keyword when declaring a class pointer variable in C++?
I've seen this in embedded environments so I suspect that this is some kind of hold over from C. I've seen plenty of explanations on when to use the…

Jonathan
- 67
- 1
- 8
2
votes
1 answer
Ada: Declaration & assignment overhead
I'm curious about the initialization within Ada procedures:
Suppose I have the following procedure:
procedure Foo (Bar : Integer) is
Another_Bar : Integer := Bar;
begin
...
end Foo;
Should the assignment to Another_Bar have the same…

digital_hog
- 202
- 1
- 11
2
votes
1 answer
Proof generated interactively with :elab doesn't work
I'm trying to prove following statement with the interactive proof assistant:
total
concatAssoc : (x : List a) -> (y : List a) -> (z : List a) -> (x ++ y) ++ z = x ++ (y ++ z)
concatAssoc = ?h
I understand how it can be proven without elaborator…

stop-cran
- 4,229
- 2
- 30
- 47
2
votes
2 answers
Ada deferred constant finalized using complicated calculation; where to put the code?
I needed the result of a rather complex calculation to define a private type, something like this:
generic
top_m : Positive;
package Mystic is
type T is private;
private
type Table is array (Positive range <>) of Positive;
function…

Kryptozoon
- 133
- 6
2
votes
1 answer
Systemverilog elaboration phase info print?
Does anyone know a way to make Systemverilog print something I want one time at the elaboration phase?
I know you can use new $error() system call to print errors at the elaboration phase, but I just want to print info there (not an error) one…

user5888527
- 81
- 2
- 8
0
votes
3 answers
Segmentation Fault during runtime elaboration: Ada
My program is seg-faulting in the package elaboration section. I declare a a bunch of variables in a block in the body. They are all records with a QLOCK, First ID Number, Last ID Number, and a data array. All different types because the data and ID…

JDiGz
- 23
- 5
0
votes
1 answer
multiple drive issue when receiving inputs from external source in verilog synthesis
The synthesis I'm trying to do is on a GCD algorithm Finite State Machine that works using the "subtract if bigger" method. I will attach the code and try and formulate a decent question.
module GCD_R (A,B,out,nrst,act,clk,fla_g);
input [31:0]…
0
votes
2 answers
Compare two json files using jq or any other tools in bash
I want to compare two json files to see if one can be extracted from the other one.
P1 (p1.json)
{
"id": 12,
"keys": ["key1","key2"],
"body": {
"height": "180cm",
"wight": "70kg"
},
"name": "Alex"
}
P2 (p2.json)
{
"id": 12,
…

Mortie
- 316
- 1
- 4
- 13
0
votes
1 answer
Ada library initialisation/elaboration and GPR directives : can't find elaboration symbol
I am trying to produce an Ada library for iOS.
However, it is necessary to perform the Ada elaboration manually.
I know that the compiler can produce an init symbol, that can be later imported and used. However, with the following GPR definition, it…

LoneWanderer
- 3,058
- 1
- 23
- 41
0
votes
1 answer
Avoid warning about static vs dynamic elaboration checks with GNATCOLL on macOS
I am trying to use GNATCOLL (on macOS) by adding
with "gnatcoll"
to my .gpr file, but I am getting this warning:
warning: "main.adb" has dynamic elaboration checks and with's
warning: "gnatcoll-traces.ads" which has static elaboration checks
I…

Akuri
- 33
- 3
0
votes
0 answers
Images Elaboration Matlab
I'm trying to do this but I don't find any solution.
I have this image A
and I would like to have the same white areas in this image B
How can I do this in Matlab?
Thanks for your help!

Paolo Guizzardi
- 21
- 5