a transformation of a function into a corresponding function in a more general context.
Questions tagged [lifting]
84 questions
1
vote
2 answers
Haar Lifting scheme
I am trying to apply lifting scheme version haar to an image. I started to apply it using the code posted on the internet:
image = imread('cameraman.tif');
% Applying Lifting scheme
lshaar = liftwave('haar');
els = {'p',[-0.125…

Christina
- 903
- 16
- 39
1
vote
1 answer
What does it mean that 'lift is pretty much the same as map'?
Leonardo Borges has written an excellent post called "Functional Composition With Monads, Kleislis and Functors".
In it he comments:
Mark pointed out to me that lift is pretty much the same as map but with the arguments reversed.
This means that…

hawkeye
- 34,745
- 30
- 150
- 304
1
vote
1 answer
lifting into a data type (Haskell)
type PT_Int = Int
type PT_String = String
data PolyType = PT_Int Int | PT_String String
Given a function f, how do I write a function that lifts it into PolyType?
(just trying to understand lifting)

Paul Kar.
- 1,293
- 2
- 21
- 32
1
vote
1 answer
Execute monadic code from newly created monad
I currently have two monads who share the same types, implemented similar to a State monad:
newtype FooRead a = FooRead { runFooRead :: Context -> (a,Context) }
newtype FooWrite a = FooWrite { runFooWrite :: Context -> (a,Context) }
The…

definelicht
- 428
- 2
- 14
1
vote
1 answer
automatic lifting of expressions in scala for concurrency
I want to evaluate arguments to any function in parallel transparently (without any source level changes).
For example -
c = f(a, b) should result in:
a and b being evaluated in parallel and then invoking of f.
One way to do this is to…

akh
- 101
- 2
- 5
0
votes
1 answer
Lifting member functions from a class template to a second class template over the first one
This is a follow-up question to this question.
There, thanks to the answer of Jarod42, I managed to lift the member function get_first()of a class template two_val to all classes of the form trait_vector>. See the code block below in…

Manuel Du
- 15
- 4
0
votes
1 answer
Scala: lift on Array
So I have an array and I can do:
myArr.lift(0)
...and it gives me option of the value at index 0.
So what actually is happening here? When I try to go to lift definition, IDE takes me to PartialFunction, and I see Array doesn't inherit from it.
And…

Mandroid
- 6,200
- 12
- 64
- 134
0
votes
1 answer
onChange not firing for custom Child component
I have a custom built component called Autocomplete that is essentially a text input box, that among other things, gets the user input when its is typed in. It has an onChange handler like this:
class Autocomplete extends Component {
…

gwydion93
- 1,681
- 3
- 28
- 59
0
votes
0 answers
Lifting an obfuscated stack machine to LLVM IR
I am researching a code virtualization solution named VMProtect, which creates a custom stack machine with a virtual instruction set, to obfuscate code. What I want to do, is lift every virtual machine instruction handler, most of which consists of…
0
votes
1 answer
getting Data stored in an LLVM variable
I am building a lifter that translates assembly code into LLVM IR. I was wondering if there is a possible way to check the data stored inside an LLVM variable. For example in my code below. I am creating a dummy LLVM function. Inside my function, I…

hany erfan
- 95
- 7
0
votes
0 answers
How to get data stored in memory pointed to by an llvm pointer
I am building a lifter that translates armv7m assembly instructions into llvm IR. A sample of my C++ code is:
IRBuilder<> builder(TheContext); //line 0
llvm::ConstantInt* I_0 = llvm::ConstantInt::get(TheContext, llvm::APInt(/nbits/32, 0, true));…

hany erfan
- 95
- 7
0
votes
1 answer
Translating armv7m instructions into LLVM IR
I am developing a lifter in c++ that lifts armv7m instructions into LLVM IR.
now I'm in the translation phase where I simply input an arm instruction and translate it into the equivalent SSA LLVM IR instructions.
My architecture simply creates an…

hany erfan
- 95
- 7
0
votes
1 answer
Using lift with the Either or the Maybe monad
When I read about the concept of lift, it's implemented like this (in Javascript)
const liftA2 = f => (a, b) => b.ap(a.map(f));
I realise there is a case in which liftA2 will produce an error: when b is a Right/Just and a is a Left/Nothing, because…

geoffrey
- 2,080
- 9
- 13
0
votes
2 answers
Lifting function in reactjs
const updateSearchTopStoriesState = (hits, page) => (prevState) => {
const { searchKey, results } = prevState
Can anyone explain to me what does the above do? why is there 2 arrow functions?
This is the whole code
const updateSearchTopStoriesState…

user56979
- 59
- 1
- 8
0
votes
1 answer
Pattern Matching on a Lifted Type (Slick Lifted Embedding)
If I wanted to pattern match on a basic option type in Scala, I would run something along the lines of
val opt = Option(5)
val lessThanTen = opt match {
case Some(e) => if (e < 10) true else false
case None => None
}
But suppose that opt…

Elie Bergman
- 121
- 4