A-infinity structure and superpotentials